Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: content/browser/browser_main_loop.h

Issue 9372027: Revert 121236 - Support sharing of ContentMain and BrowserMain code with embedded use cases (try ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/browser_main.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 5 #ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 26 matching lines...) Expand all
37 class BrowserMainLoop { 37 class BrowserMainLoop {
38 public: 38 public:
39 explicit BrowserMainLoop(const content::MainFunctionParams& parameters); 39 explicit BrowserMainLoop(const content::MainFunctionParams& parameters);
40 virtual ~BrowserMainLoop(); 40 virtual ~BrowserMainLoop();
41 41
42 void Init(); 42 void Init();
43 43
44 void EarlyInitialization(); 44 void EarlyInitialization();
45 void InitializeToolkit(); 45 void InitializeToolkit();
46 void MainMessageLoopStart(); 46 void MainMessageLoopStart();
47 47 void RunMainMessageLoopParts(bool* completed_main_message_loop);
48 // Create all secondary threads. 48 void MainMessageLoopRun();
49 void CreateThreads();
50
51 // Perform the default message loop run logic.
52 void RunMainMessageLoopParts();
53
54 // Performs the shutdown sequence, starting with PostMainMessageLoopRun
55 // through stopping threads to PostDestroyThreads.
56 void ShutdownThreadsAndCleanUp();
57 49
58 int GetResultCode() const { return result_code_; } 50 int GetResultCode() const { return result_code_; }
59 51
60 private: 52 private:
61 // For ShutdownThreadsAndCleanUp. 53 // For ShutdownThreadsAndCleanUp.
62 friend class BrowserShutdownImpl; 54 friend class BrowserShutdownImpl;
63 55
56 // Performs the shutdown sequence, starting with PostMainMessageLoopRun
57 // through stopping threads to PostDestroyThreads.
58 void ShutdownThreadsAndCleanUp();
59
64 void InitializeMainThread(); 60 void InitializeMainThread();
65 61
66 // Called right after the browser threads have been started. 62 // Called right after the browser threads have been started.
67 void BrowserThreadsStarted(); 63 void BrowserThreadsStarted();
68 64
69 void MainMessageLoopRun();
70
71 // Members initialized on construction --------------------------------------- 65 // Members initialized on construction ---------------------------------------
72 const content::MainFunctionParams& parameters_; 66 const content::MainFunctionParams& parameters_;
73 const CommandLine& parsed_command_line_; 67 const CommandLine& parsed_command_line_;
74 int result_code_; 68 int result_code_;
75 69
76 // Members initialized in |MainMessageLoopStart()| --------------------------- 70 // Members initialized in |MainMessageLoopStart()| ---------------------------
77 scoped_ptr<MessageLoop> main_message_loop_; 71 scoped_ptr<MessageLoop> main_message_loop_;
78 scoped_ptr<base::SystemMonitor> system_monitor_; 72 scoped_ptr<base::SystemMonitor> system_monitor_;
79 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; 73 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_;
80 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; 74 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
(...skipping 20 matching lines...) Expand all
101 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_; 95 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_;
102 scoped_ptr<BrowserProcessSubThread> cache_thread_; 96 scoped_ptr<BrowserProcessSubThread> cache_thread_;
103 scoped_ptr<BrowserProcessSubThread> io_thread_; 97 scoped_ptr<BrowserProcessSubThread> io_thread_;
104 98
105 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 99 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
106 }; 100 };
107 101
108 } // namespace content 102 } // namespace content
109 103
110 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 104 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698