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

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

Issue 2261073002: Make HistoryBackend a client of memory coordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 4 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 MemoryCoordinator;
55 } // namespace memory_coordinator
56
57 namespace mojo { 53 namespace mojo {
58 namespace edk { 54 namespace edk {
59 class ScopedIPCSupport; 55 class ScopedIPCSupport;
60 } // namespace edk 56 } // namespace edk
61 } // namespace mojo 57 } // namespace mojo
62 58
63 namespace net { 59 namespace net {
64 class NetworkChangeNotifier; 60 class NetworkChangeNotifier;
65 } // namespace net 61 } // namespace net
66 62
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 bool is_tracing_startup_for_duration() const { 137 bool is_tracing_startup_for_duration() const {
142 return is_tracing_startup_for_duration_; 138 return is_tracing_startup_for_duration_;
143 } 139 }
144 140
145 const base::FilePath& startup_trace_file() const { 141 const base::FilePath& startup_trace_file() const {
146 return startup_trace_file_; 142 return startup_trace_file_;
147 } 143 }
148 144
149 void StopStartupTracingTimer(); 145 void StopStartupTracingTimer();
150 146
151 memory_coordinator::MemoryCoordinator* memory_coordinator() const {
152 return memory_coordinator_.get();
153 }
154
155 #if defined(OS_MACOSX) && !defined(OS_IOS) 147 #if defined(OS_MACOSX) && !defined(OS_IOS)
156 media::DeviceMonitorMac* device_monitor_mac() const { 148 media::DeviceMonitorMac* device_monitor_mac() const {
157 return device_monitor_mac_.get(); 149 return device_monitor_mac_.get();
158 } 150 }
159 #endif 151 #endif
160 152
161 private: 153 private:
162 class MemoryObserver; 154 class MemoryObserver;
163 155
164 void InitializeMainThread(); 156 void InitializeMainThread();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // Members initialized in |InitializeMainThread()| --------------------------- 244 // Members initialized in |InitializeMainThread()| ---------------------------
253 // This must get destroyed before other threads that are created in |parts_|. 245 // This must get destroyed before other threads that are created in |parts_|.
254 std::unique_ptr<BrowserThreadImpl> main_thread_; 246 std::unique_ptr<BrowserThreadImpl> main_thread_;
255 247
256 // Members initialized in |CreateStartupTasks()| ----------------------------- 248 // Members initialized in |CreateStartupTasks()| -----------------------------
257 std::unique_ptr<StartupTaskRunner> startup_task_runner_; 249 std::unique_ptr<StartupTaskRunner> startup_task_runner_;
258 250
259 // Members initialized in |PreCreateThreads()| ------------------------------- 251 // Members initialized in |PreCreateThreads()| -------------------------------
260 // Torn down in ShutdownThreadsAndCleanUp. 252 // Torn down in ShutdownThreadsAndCleanUp.
261 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_; 253 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_;
262 std::unique_ptr<memory_coordinator::MemoryCoordinator> memory_coordinator_;
263 254
264 // Members initialized in |CreateThreads()| ---------------------------------- 255 // Members initialized in |CreateThreads()| ----------------------------------
265 std::unique_ptr<BrowserProcessSubThread> db_thread_; 256 std::unique_ptr<BrowserProcessSubThread> db_thread_;
266 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_; 257 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_;
267 std::unique_ptr<BrowserProcessSubThread> file_thread_; 258 std::unique_ptr<BrowserProcessSubThread> file_thread_;
268 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_; 259 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_;
269 std::unique_ptr<BrowserProcessSubThread> cache_thread_; 260 std::unique_ptr<BrowserProcessSubThread> cache_thread_;
270 std::unique_ptr<BrowserProcessSubThread> io_thread_; 261 std::unique_ptr<BrowserProcessSubThread> io_thread_;
271 262
272 // Members initialized in |BrowserThreadsStarted()| -------------------------- 263 // Members initialized in |BrowserThreadsStarted()| --------------------------
(...skipping 28 matching lines...) Expand all
301 scoped_refptr<SaveFileManager> save_file_manager_; 292 scoped_refptr<SaveFileManager> save_file_manager_;
302 293
303 // DO NOT add members here. Add them to the right categories above. 294 // DO NOT add members here. Add them to the right categories above.
304 295
305 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 296 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
306 }; 297 };
307 298
308 } // namespace content 299 } // namespace content
309 300
310 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 301 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698