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

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: rebase Created 4 years, 5 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
« no previous file with comments | « content/browser/DEPS ('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 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 MemoryCoordinator;
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 bool is_tracing_startup_for_duration() const { 140 bool is_tracing_startup_for_duration() const {
137 return is_tracing_startup_for_duration_; 141 return is_tracing_startup_for_duration_;
138 } 142 }
139 143
140 const base::FilePath& startup_trace_file() const { 144 const base::FilePath& startup_trace_file() const {
141 return startup_trace_file_; 145 return startup_trace_file_;
142 } 146 }
143 147
144 void StopStartupTracingTimer(); 148 void StopStartupTracingTimer();
145 149
150 memory_coordinator::MemoryCoordinator* memory_coordinator() const {
151 return memory_coordinator_.get();
152 }
153
146 #if defined(OS_MACOSX) && !defined(OS_IOS) 154 #if defined(OS_MACOSX) && !defined(OS_IOS)
147 media::DeviceMonitorMac* device_monitor_mac() const { 155 media::DeviceMonitorMac* device_monitor_mac() const {
148 return device_monitor_mac_.get(); 156 return device_monitor_mac_.get();
149 } 157 }
150 #endif 158 #endif
151 159
152 private: 160 private:
153 class MemoryObserver; 161 class MemoryObserver;
154 162
155 void InitializeMainThread(); 163 void InitializeMainThread();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 // Members initialized in |InitializeMainThread()| --------------------------- 250 // Members initialized in |InitializeMainThread()| ---------------------------
243 // This must get destroyed before other threads that are created in |parts_|. 251 // This must get destroyed before other threads that are created in |parts_|.
244 std::unique_ptr<BrowserThreadImpl> main_thread_; 252 std::unique_ptr<BrowserThreadImpl> main_thread_;
245 253
246 // Members initialized in |CreateStartupTasks()| ----------------------------- 254 // Members initialized in |CreateStartupTasks()| -----------------------------
247 std::unique_ptr<StartupTaskRunner> startup_task_runner_; 255 std::unique_ptr<StartupTaskRunner> startup_task_runner_;
248 256
249 // Members initialized in |PreCreateThreads()| ------------------------------- 257 // Members initialized in |PreCreateThreads()| -------------------------------
250 // Torn down in ShutdownThreadsAndCleanUp. 258 // Torn down in ShutdownThreadsAndCleanUp.
251 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_; 259 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_;
260 std::unique_ptr<memory_coordinator::MemoryCoordinator> memory_coordinator_;
252 261
253 // Members initialized in |CreateThreads()| ---------------------------------- 262 // Members initialized in |CreateThreads()| ----------------------------------
254 std::unique_ptr<BrowserProcessSubThread> db_thread_; 263 std::unique_ptr<BrowserProcessSubThread> db_thread_;
255 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_; 264 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_;
256 std::unique_ptr<BrowserProcessSubThread> file_thread_; 265 std::unique_ptr<BrowserProcessSubThread> file_thread_;
257 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_; 266 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_;
258 std::unique_ptr<BrowserProcessSubThread> cache_thread_; 267 std::unique_ptr<BrowserProcessSubThread> cache_thread_;
259 std::unique_ptr<BrowserProcessSubThread> io_thread_; 268 std::unique_ptr<BrowserProcessSubThread> io_thread_;
260 269
261 // Members initialized in |BrowserThreadsStarted()| -------------------------- 270 // Members initialized in |BrowserThreadsStarted()| --------------------------
(...skipping 27 matching lines...) Expand all
289 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_; 298 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_;
290 299
291 // DO NOT add members here. Add them to the right categories above. 300 // DO NOT add members here. Add them to the right categories above.
292 301
293 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 302 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
294 }; 303 };
295 304
296 } // namespace content 305 } // namespace content
297 306
298 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 307 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698