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

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

Issue 106223002: chrome power profiler chrome side changes (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years 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_PROCESS_SUB_THREAD_H_ 5 #ifndef CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_
6 #define CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ 6 #define CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "content/browser/browser_thread_impl.h" 9 #include "content/browser/browser_thread_impl.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 11
12 #if defined(OS_WIN) 12 #if defined(OS_WIN)
13 namespace base { 13 namespace base {
14 namespace win { 14 namespace win {
15 class ScopedCOMInitializer; 15 class ScopedCOMInitializer;
16 } 16 }
17 } 17 }
18 #endif 18 #endif
19 19
20 namespace content { 20 namespace content {
21 class NotificationService; 21 class NotificationService;
22 class PowerProfilerService;
22 } 23 }
23 24
24 namespace content { 25 namespace content {
25 26
26 // ---------------------------------------------------------------------------- 27 // ----------------------------------------------------------------------------
27 // BrowserProcessSubThread 28 // BrowserProcessSubThread
28 // 29 //
29 // This simple thread object is used for the specialized threads that the 30 // This simple thread object is used for the specialized threads that the
30 // BrowserProcess spins up. 31 // BrowserProcess spins up.
31 // 32 //
32 // Applications must initialize the COM library before they can call 33 // Applications must initialize the COM library before they can call
33 // COM library functions other than CoGetMalloc and memory allocation 34 // COM library functions other than CoGetMalloc and memory allocation
34 // functions, so this class initializes COM for those users. 35 // functions, so this class initializes COM for those users.
35 class CONTENT_EXPORT BrowserProcessSubThread : public BrowserThreadImpl { 36 class CONTENT_EXPORT BrowserProcessSubThread : public BrowserThreadImpl {
36 public: 37 public:
37 explicit BrowserProcessSubThread(BrowserThread::ID identifier); 38 explicit BrowserProcessSubThread(BrowserThread::ID identifier);
38 virtual ~BrowserProcessSubThread(); 39 virtual ~BrowserProcessSubThread();
39 40
40 protected: 41 protected:
41 virtual void Init() OVERRIDE; 42 virtual void Init() OVERRIDE;
42 virtual void CleanUp() OVERRIDE; 43 virtual void CleanUp() OVERRIDE;
43 44
44 private: 45 private:
45 // These methods encapsulate cleanup that needs to happen on the IO thread 46 // These methods encapsulate cleanup that needs to happen on the IO thread
46 // before we call the embedder's CleanUp function. 47 // before we call the embedder's CleanUp function.
47 void IOThreadPreCleanUp(); 48 void IOThreadPreCleanUp();
49 void PowerProfilerThreadPreCleanUp();
48 50
49 #if defined (OS_WIN) 51 #if defined (OS_WIN)
50 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; 52 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_;
51 #endif 53 #endif
52 54
53 // Each specialized thread has its own notification service. 55 // Each specialized thread has its own notification service.
54 scoped_ptr<NotificationService> notification_service_; 56 scoped_ptr<NotificationService> notification_service_;
55 57
58 // Power Profiler thread will has its own service.
59 scoped_ptr<PowerProfilerService> power_profiler_service_;
56 DISALLOW_COPY_AND_ASSIGN(BrowserProcessSubThread); 60 DISALLOW_COPY_AND_ASSIGN(BrowserProcessSubThread);
57 }; 61 };
58 62
59 } // namespace content 63 } // namespace content
60 64
61 #endif // CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ 65 #endif // CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698