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

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

Issue 2094583002: Add MemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 4 years, 6 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
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 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #endif 43 #endif
44 class UserInputMonitor; 44 class UserInputMonitor;
45 #if defined(OS_MACOSX) 45 #if defined(OS_MACOSX)
46 class DeviceMonitorMac; 46 class DeviceMonitorMac;
47 #endif 47 #endif
48 namespace midi { 48 namespace midi {
49 class MidiManager; 49 class MidiManager;
50 } // namespace midi 50 } // namespace midi
51 } // namespace media 51 } // namespace media
52 52
53 namespace memory_coordinator {
54 class MemoryStateNotifier;
55 } // namespace memory_coordinator
56
53 namespace mojo { 57 namespace mojo {
54 namespace edk { 58 namespace edk {
55 class ScopedIPCSupport; 59 class ScopedIPCSupport;
56 } // namespace edk 60 } // namespace edk
57 } // namespace mojo 61 } // namespace mojo
58 62
59 namespace net { 63 namespace net {
60 class NetworkChangeNotifier; 64 class NetworkChangeNotifier;
61 } // namespace net 65 } // namespace net
62 66
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 bool is_tracing_startup_for_duration() const { 139 bool is_tracing_startup_for_duration() const {
136 return is_tracing_startup_for_duration_; 140 return is_tracing_startup_for_duration_;
137 } 141 }
138 142
139 const base::FilePath& startup_trace_file() const { 143 const base::FilePath& startup_trace_file() const {
140 return startup_trace_file_; 144 return startup_trace_file_;
141 } 145 }
142 146
143 void StopStartupTracingTimer(); 147 void StopStartupTracingTimer();
144 148
149 memory_coordinator::MemoryStateNotifier* memory_state_notifier() const {
150 return memory_state_notifier_.get();
151 }
152
145 #if defined(OS_MACOSX) && !defined(OS_IOS) 153 #if defined(OS_MACOSX) && !defined(OS_IOS)
146 media::DeviceMonitorMac* device_monitor_mac() const { 154 media::DeviceMonitorMac* device_monitor_mac() const {
147 return device_monitor_mac_.get(); 155 return device_monitor_mac_.get();
148 } 156 }
149 #endif 157 #endif
150 158
151 private: 159 private:
152 class MemoryObserver; 160 class MemoryObserver;
153 161
154 void InitializeMainThread(); 162 void InitializeMainThread();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // Members initialized in |InitializeMainThread()| --------------------------- 249 // Members initialized in |InitializeMainThread()| ---------------------------
242 // This must get destroyed before other threads that are created in |parts_|. 250 // This must get destroyed before other threads that are created in |parts_|.
243 std::unique_ptr<BrowserThreadImpl> main_thread_; 251 std::unique_ptr<BrowserThreadImpl> main_thread_;
244 252
245 // Members initialized in |CreateStartupTasks()| ----------------------------- 253 // Members initialized in |CreateStartupTasks()| -----------------------------
246 std::unique_ptr<StartupTaskRunner> startup_task_runner_; 254 std::unique_ptr<StartupTaskRunner> startup_task_runner_;
247 255
248 // Members initialized in |PreCreateThreads()| ------------------------------- 256 // Members initialized in |PreCreateThreads()| -------------------------------
249 // Torn down in ShutdownThreadsAndCleanUp. 257 // Torn down in ShutdownThreadsAndCleanUp.
250 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_; 258 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_;
259 std::unique_ptr<memory_coordinator::MemoryStateNotifier>
260 memory_state_notifier_;
251 261
252 // Members initialized in |CreateThreads()| ---------------------------------- 262 // Members initialized in |CreateThreads()| ----------------------------------
253 std::unique_ptr<BrowserProcessSubThread> db_thread_; 263 std::unique_ptr<BrowserProcessSubThread> db_thread_;
254 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_; 264 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_;
255 std::unique_ptr<BrowserProcessSubThread> file_thread_; 265 std::unique_ptr<BrowserProcessSubThread> file_thread_;
256 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_; 266 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_;
257 std::unique_ptr<BrowserProcessSubThread> cache_thread_; 267 std::unique_ptr<BrowserProcessSubThread> cache_thread_;
258 std::unique_ptr<BrowserProcessSubThread> io_thread_; 268 std::unique_ptr<BrowserProcessSubThread> io_thread_;
259 269
260 // Members initialized in |BrowserThreadsStarted()| -------------------------- 270 // Members initialized in |BrowserThreadsStarted()| --------------------------
(...skipping 26 matching lines...) Expand all
287 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_; 297 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_;
288 298
289 // DO NOT add members here. Add them to the right categories above. 299 // DO NOT add members here. Add them to the right categories above.
290 300
291 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 301 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
292 }; 302 };
293 303
294 } // namespace content 304 } // namespace content
295 305
296 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 306 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698