]> khamidou — GitHub mirrors - electron.git/commitdiff
Move BrowserProcess to BrowserMainParts
authorCheng Zhao <zcbenz@gmail.com>
Thu, 18 Jun 2015 08:33:12 +0000 (16:33 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 18 Jun 2015 08:34:02 +0000 (16:34 +0800)
atom/browser/atom_browser_context.cc
atom/browser/atom_browser_context.h
atom/browser/atom_browser_main_parts.cc
atom/browser/atom_browser_main_parts.h

index e31ebc4147e41923eff22c94f518925d325b91bf..f09f094bf4283f2fd43728b9a5c681523983ff43 100644 (file)
@@ -13,7 +13,6 @@
 #include "base/command_line.h"
 #include "base/threading/sequenced_worker_pool.h"
 #include "base/threading/worker_pool.h"
-#include "chrome/browser/browser_process.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/common/url_constants.h"
 #include "net/ftp/ftp_network_layer.h"
@@ -40,8 +39,7 @@ class NoCacheBackend : public net::HttpCache::BackendFactory {
 }  // namespace
 
 AtomBrowserContext::AtomBrowserContext()
-    : fake_browser_process_(new BrowserProcess),
-      job_factory_(new AtomURLRequestJobFactory) {
+    : job_factory_(new AtomURLRequestJobFactory) {
 }
 
 AtomBrowserContext::~AtomBrowserContext() {
index ab28c3e81a0c4a9bae9b9949c5d37b9547643d5b..2f2efc944330536831d6485349fa96039419f268 100644 (file)
@@ -7,8 +7,6 @@
 
 #include "brightray/browser/browser_context.h"
 
-class BrowserProcess;
-
 namespace atom {
 
 class AtomURLRequestJobFactory;
@@ -35,8 +33,6 @@ class AtomBrowserContext : public brightray::BrowserContext {
   AtomURLRequestJobFactory* job_factory() const { return job_factory_; }
 
  private:
-  // A fake BrowserProcess object that used to feed the source code from chrome.
-  scoped_ptr<BrowserProcess> fake_browser_process_;
   scoped_ptr<WebViewManager> guest_manager_;
 
   AtomURLRequestJobFactory* job_factory_;  // Weak reference.
index aaf68836d0c32c8890394d61953ce966adee51c2..a63ec9a703b26bb0a90653430ec469204ff9bbe0 100644 (file)
@@ -11,6 +11,7 @@
 #include "atom/common/api/atom_bindings.h"
 #include "atom/common/node_bindings.h"
 #include "base/command_line.h"
+#include "chrome/browser/browser_process.h"
 #include "v8/include/v8-debug.h"
 
 #if defined(USE_X11)
@@ -25,7 +26,8 @@ namespace atom {
 AtomBrowserMainParts* AtomBrowserMainParts::self_ = NULL;
 
 AtomBrowserMainParts::AtomBrowserMainParts()
-    : browser_(new Browser),
+    : fake_browser_process_(new BrowserProcess),
+      browser_(new Browser),
       node_bindings_(NodeBindings::Create(true)),
       atom_bindings_(new AtomBindings),
       gc_timer_(true, true) {
index 6ca0686655baa4a103da66a70e845abc63e2c10d..c7d688f7c32343b57517f46d68829caed11a575e 100644 (file)
@@ -8,6 +8,8 @@
 #include "base/timer/timer.h"
 #include "brightray/browser/browser_main_parts.h"
 
+class BrowserProcess;
+
 namespace atom {
 
 class AtomBindings;
@@ -41,6 +43,9 @@ class AtomBrowserMainParts : public brightray::BrowserMainParts {
   void SetDPIFromGSettings();
 #endif
 
+  // A fake BrowserProcess object that used to feed the source code from chrome.
+  scoped_ptr<BrowserProcess> fake_browser_process_;
+
   scoped_ptr<Browser> browser_;
   scoped_ptr<JavascriptEnvironment> js_env_;
   scoped_ptr<NodeBindings> node_bindings_;