mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: eliminate brightray::BrowserClient (#15320)
This commit is contained in:
committed by
Alexey Kuzmin
parent
a4fefbe836
commit
fbbb704146
@@ -9,7 +9,6 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/path_service.h"
|
||||
#include "brightray/browser/browser_client.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "services/service_manager/embedder/switches.h"
|
||||
@@ -97,13 +96,4 @@ void MainDelegate::PreSandboxStartup() {
|
||||
}
|
||||
}
|
||||
|
||||
content::ContentBrowserClient* MainDelegate::CreateContentBrowserClient() {
|
||||
browser_client_ = CreateBrowserClient();
|
||||
return browser_client_.get();
|
||||
}
|
||||
|
||||
std::unique_ptr<BrowserClient> MainDelegate::CreateBrowserClient() {
|
||||
return std::unique_ptr<BrowserClient>(new BrowserClient);
|
||||
}
|
||||
|
||||
} // namespace brightray
|
||||
|
||||
@@ -21,8 +21,6 @@ class ResourceBundle;
|
||||
|
||||
namespace brightray {
|
||||
|
||||
class BrowserClient;
|
||||
|
||||
void LoadResourceBundle(const std::string& locale);
|
||||
void LoadCommonResources();
|
||||
|
||||
@@ -32,10 +30,6 @@ class MainDelegate : public content::ContentMainDelegate {
|
||||
~MainDelegate() override;
|
||||
|
||||
protected:
|
||||
// Subclasses can override this to provide their own BrowserClient
|
||||
// implementation.
|
||||
virtual std::unique_ptr<BrowserClient> CreateBrowserClient();
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
// Subclasses can override this to custom the paths of child process and
|
||||
// framework bundle.
|
||||
@@ -47,10 +41,6 @@ class MainDelegate : public content::ContentMainDelegate {
|
||||
void PreSandboxStartup() override;
|
||||
|
||||
private:
|
||||
content::ContentBrowserClient* CreateContentBrowserClient() override;
|
||||
|
||||
std::unique_ptr<BrowserClient> browser_client_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MainDelegate);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user