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

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

Issue 9375017: Support sharing of ContentMain and BrowserMain code with embedded use cases (try #3). (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 void RunMainMessageLoopParts(bool* completed_main_message_loop); 47
48 void MainMessageLoopRun(); 48 // Create all secondary threads.
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();
49 57
50 int GetResultCode() const { return result_code_; } 58 int GetResultCode() const { return result_code_; }
51 59
52 private: 60 private:
53 // For ShutdownThreadsAndCleanUp. 61 // For ShutdownThreadsAndCleanUp.
54 friend class BrowserShutdownImpl; 62 friend class BrowserShutdownImpl;
55 63
56 // Performs the shutdown sequence, starting with PostMainMessageLoopRun
57 // through stopping threads to PostDestroyThreads.
58 void ShutdownThreadsAndCleanUp();
59
60 void InitializeMainThread(); 64 void InitializeMainThread();
61 65
62 // Called right after the browser threads have been started. 66 // Called right after the browser threads have been started.
63 void BrowserThreadsStarted(); 67 void BrowserThreadsStarted();
64 68
69 void MainMessageLoopRun();
70
65 // Members initialized on construction --------------------------------------- 71 // Members initialized on construction ---------------------------------------
66 const content::MainFunctionParams& parameters_; 72 const content::MainFunctionParams& parameters_;
67 const CommandLine& parsed_command_line_; 73 const CommandLine& parsed_command_line_;
68 int result_code_; 74 int result_code_;
69 75
70 // Members initialized in |MainMessageLoopStart()| --------------------------- 76 // Members initialized in |MainMessageLoopStart()| ---------------------------
71 scoped_ptr<MessageLoop> main_message_loop_; 77 scoped_ptr<MessageLoop> main_message_loop_;
72 scoped_ptr<base::SystemMonitor> system_monitor_; 78 scoped_ptr<base::SystemMonitor> system_monitor_;
73 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; 79 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_;
74 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; 80 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
(...skipping 20 matching lines...) Expand all
95 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_; 101 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_;
96 scoped_ptr<BrowserProcessSubThread> cache_thread_; 102 scoped_ptr<BrowserProcessSubThread> cache_thread_;
97 scoped_ptr<BrowserProcessSubThread> io_thread_; 103 scoped_ptr<BrowserProcessSubThread> io_thread_;
98 104
99 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 105 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
100 }; 106 };
101 107
102 } // namespace content 108 } // namespace content
103 109
104 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 110 #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