-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #981 from brave/issue/998
Import open windows and tabs from legacy Brave
- Loading branch information
Showing
33 changed files
with
445 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/common/importer/imported_browser_window.h" | ||
|
||
ImportedBrowserTab::ImportedBrowserTab() {} | ||
ImportedBrowserTab::ImportedBrowserTab(const ImportedBrowserTab& other) = default; | ||
ImportedBrowserTab::~ImportedBrowserTab() {} | ||
|
||
ImportedBrowserWindow::ImportedBrowserWindow() {} | ||
ImportedBrowserWindow::ImportedBrowserWindow(const ImportedBrowserWindow& other) = default; | ||
ImportedBrowserWindow::~ImportedBrowserWindow() {} | ||
|
||
ImportedWindowState::ImportedWindowState() {} | ||
ImportedWindowState::ImportedWindowState(const ImportedWindowState& other) = default; | ||
ImportedWindowState::~ImportedWindowState() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef BRAVE_COMMON_IMPORTER_IMPORTED_BROWSER_WINDOW_H_ | ||
#define BRAVE_COMMON_IMPORTER_IMPORTED_BROWSER_WINDOW_H_ | ||
|
||
#include <string> | ||
#include <vector> | ||
#include "url/gurl.h" | ||
|
||
struct ImportedBrowserTab { | ||
ImportedBrowserTab(); | ||
ImportedBrowserTab(const ImportedBrowserTab& other); | ||
~ImportedBrowserTab(); | ||
|
||
int key; | ||
GURL location; | ||
}; | ||
|
||
struct ImportedBrowserWindow { | ||
ImportedBrowserWindow(); | ||
ImportedBrowserWindow(const ImportedBrowserWindow& other); | ||
~ImportedBrowserWindow(); | ||
|
||
int top; | ||
int left; | ||
int width; | ||
int height; | ||
|
||
bool focused; | ||
|
||
// "normal", "minimized", "maximized", or "fullscreen" | ||
std::string state; | ||
|
||
// Warning: activeFrameKey may not reference an existing key in the frames | ||
// Array. For example, if a private or private w/ Tor tab was focused when the | ||
// browser closed, it will be the activeFrameKey, but it will not be | ||
// persisted. | ||
int activeFrameKey; | ||
|
||
std::vector<ImportedBrowserTab> tabs; | ||
}; | ||
|
||
struct ImportedWindowState { | ||
ImportedWindowState(); | ||
ImportedWindowState(const ImportedWindowState& other); | ||
~ImportedWindowState(); | ||
|
||
std::vector<ImportedBrowserWindow> windows; | ||
std::vector<ImportedBrowserTab> pinnedTabs; | ||
}; | ||
|
||
#endif // BRAVE_COMMON_IMPORTER_IMPORTED_BROWSER_WINDOW_H_ |
Oops, something went wrong.