OLD | NEW |
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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/browser/browser_process_sub_thread.h" | 10 #include "content/browser/browser_process_sub_thread.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class DeviceMonitorLinux; | 42 class DeviceMonitorLinux; |
43 #elif defined(OS_MACOSX) | 43 #elif defined(OS_MACOSX) |
44 class DeviceMonitorMac; | 44 class DeviceMonitorMac; |
45 #endif | 45 #endif |
46 | 46 |
47 // Implements the main browser loop stages called from BrowserMainRunner. | 47 // Implements the main browser loop stages called from BrowserMainRunner. |
48 // See comments in browser_main_parts.h for additional info. | 48 // See comments in browser_main_parts.h for additional info. |
49 // All functions are to be called only on the UI thread unless otherwise noted. | 49 // All functions are to be called only on the UI thread unless otherwise noted. |
50 class BrowserMainLoop { | 50 class BrowserMainLoop { |
51 public: | 51 public: |
| 52 class MemoryObserver; |
52 explicit BrowserMainLoop(const MainFunctionParams& parameters); | 53 explicit BrowserMainLoop(const MainFunctionParams& parameters); |
53 virtual ~BrowserMainLoop(); | 54 virtual ~BrowserMainLoop(); |
54 | 55 |
55 void Init(); | 56 void Init(); |
56 | 57 |
57 void EarlyInitialization(); | 58 void EarlyInitialization(); |
58 void InitializeToolkit(); | 59 void InitializeToolkit(); |
59 void MainMessageLoopStart(); | 60 void MainMessageLoopStart(); |
60 | 61 |
61 // Create all secondary threads. | 62 // Create all secondary threads. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // Members initialized in |RunMainMessageLoopParts()| ------------------------ | 125 // Members initialized in |RunMainMessageLoopParts()| ------------------------ |
125 scoped_ptr<BrowserProcessSubThread> db_thread_; | 126 scoped_ptr<BrowserProcessSubThread> db_thread_; |
126 #if !defined(OS_IOS) | 127 #if !defined(OS_IOS) |
127 scoped_ptr<WebKitThread> webkit_thread_; | 128 scoped_ptr<WebKitThread> webkit_thread_; |
128 #endif | 129 #endif |
129 scoped_ptr<BrowserProcessSubThread> file_user_blocking_thread_; | 130 scoped_ptr<BrowserProcessSubThread> file_user_blocking_thread_; |
130 scoped_ptr<BrowserProcessSubThread> file_thread_; | 131 scoped_ptr<BrowserProcessSubThread> file_thread_; |
131 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_; | 132 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_; |
132 scoped_ptr<BrowserProcessSubThread> cache_thread_; | 133 scoped_ptr<BrowserProcessSubThread> cache_thread_; |
133 scoped_ptr<BrowserProcessSubThread> io_thread_; | 134 scoped_ptr<BrowserProcessSubThread> io_thread_; |
| 135 scoped_ptr<MemoryObserver> memory_observer_; |
134 | 136 |
135 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 137 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
136 }; | 138 }; |
137 | 139 |
138 } // namespace content | 140 } // namespace content |
139 | 141 |
140 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 142 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |