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

Side by Side Diff: content/child/child_thread_impl.h

Issue 2914913002: [Mac] Enable AppNap for renderers (Closed)
Patch Set: Add comment for magic numbers Created 3 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
« no previous file with comments | « chrome/app/helper-Info.plist ('k') | content/child/child_thread_impl.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_CHILD_CHILD_THREAD_IMPL_H_ 5 #ifndef CONTENT_CHILD_CHILD_THREAD_IMPL_H_
6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 class ChildResourceMessageFilter; 52 class ChildResourceMessageFilter;
53 class FileSystemDispatcher; 53 class FileSystemDispatcher;
54 class InProcessChildThreadParams; 54 class InProcessChildThreadParams;
55 class NotificationDispatcher; 55 class NotificationDispatcher;
56 class ServiceWorkerMessageFilter; 56 class ServiceWorkerMessageFilter;
57 class QuotaDispatcher; 57 class QuotaDispatcher;
58 class QuotaMessageFilter; 58 class QuotaMessageFilter;
59 class ResourceDispatcher; 59 class ResourceDispatcher;
60 class ThreadSafeSender; 60 class ThreadSafeSender;
61 61
62 #if defined(OS_MACOSX)
63 class AppNapActivity;
64 #endif
65
62 // The main thread of a child process derives from this class. 66 // The main thread of a child process derives from this class.
63 class CONTENT_EXPORT ChildThreadImpl 67 class CONTENT_EXPORT ChildThreadImpl
64 : public IPC::Listener, 68 : public IPC::Listener,
65 virtual public ChildThread, 69 virtual public ChildThread,
66 NON_EXPORTED_BASE(public mojom::RouteProvider), 70 NON_EXPORTED_BASE(public mojom::RouteProvider),
67 NON_EXPORTED_BASE(public mojom::AssociatedInterfaceProvider) { 71 NON_EXPORTED_BASE(public mojom::AssociatedInterfaceProvider) {
68 public: 72 public:
69 struct CONTENT_EXPORT Options; 73 struct CONTENT_EXPORT Options;
70 74
71 // Creates the thread. 75 // Creates the thread.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; 278 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_;
275 279
276 scoped_refptr<QuotaMessageFilter> quota_message_filter_; 280 scoped_refptr<QuotaMessageFilter> quota_message_filter_;
277 281
278 scoped_refptr<NotificationDispatcher> notification_dispatcher_; 282 scoped_refptr<NotificationDispatcher> notification_dispatcher_;
279 283
280 std::unique_ptr<base::PowerMonitor> power_monitor_; 284 std::unique_ptr<base::PowerMonitor> power_monitor_;
281 285
282 scoped_refptr<base::SingleThreadTaskRunner> browser_process_io_runner_; 286 scoped_refptr<base::SingleThreadTaskRunner> browser_process_io_runner_;
283 287
288 #if defined(OS_MACOSX)
289 std::unique_ptr<AppNapActivity> app_nap_activity_;
290 #endif // defined(OS_MACOSX)
291
284 std::unique_ptr<base::WeakPtrFactory<ChildThreadImpl>> 292 std::unique_ptr<base::WeakPtrFactory<ChildThreadImpl>>
285 channel_connected_factory_; 293 channel_connected_factory_;
286 294
287 base::WeakPtrFactory<ChildThreadImpl> weak_factory_; 295 base::WeakPtrFactory<ChildThreadImpl> weak_factory_;
288 296
289 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl); 297 DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl);
290 }; 298 };
291 299
292 struct ChildThreadImpl::Options { 300 struct ChildThreadImpl::Options {
293 Options(const Options& other); 301 Options(const Options& other);
(...skipping 25 matching lines...) Expand all
319 327
320 private: 328 private:
321 struct Options options_; 329 struct Options options_;
322 330
323 DISALLOW_COPY_AND_ASSIGN(Builder); 331 DISALLOW_COPY_AND_ASSIGN(Builder);
324 }; 332 };
325 333
326 } // namespace content 334 } // namespace content
327 335
328 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ 336 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/app/helper-Info.plist ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698