OLD | NEW |
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_PUBLIC_RENDERER_RENDER_THREAD_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ |
6 #define CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ | 6 #define CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "ipc/ipc_channel_proxy.h" | 11 #include "ipc/ipc_channel_proxy.h" |
12 | 12 |
13 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
14 #include <windows.h> | 14 #include <windows.h> |
15 #endif | 15 #endif |
16 | 16 |
17 class MessageLoop; | 17 class MessageLoop; |
18 | 18 |
| 19 namespace base { |
| 20 class HistogramSender; |
| 21 } |
| 22 |
19 namespace IPC { | 23 namespace IPC { |
20 class SyncChannel; | 24 class SyncChannel; |
21 class SyncMessageFilter; | 25 class SyncMessageFilter; |
22 } | 26 } |
23 | 27 |
24 namespace v8 { | 28 namespace v8 { |
25 class Extension; | 29 class Extension; |
26 } | 30 } |
27 | 31 |
28 namespace content { | 32 namespace content { |
29 | 33 |
30 class RenderProcessObserver; | 34 class RenderProcessObserver; |
31 class ResourceDispatcherDelegate; | 35 class ResourceDispatcherDelegate; |
32 | 36 |
33 class CONTENT_EXPORT RenderThread : public IPC::Message::Sender { | 37 class CONTENT_EXPORT RenderThread : public IPC::Message::Sender { |
34 public: | 38 public: |
35 // Returns the one render thread for this process. Note that this can only | 39 // Returns the one render thread for this process. Note that this can only |
36 // be accessed when running on the render thread itself. | 40 // be accessed when running on the render thread itself. |
37 static RenderThread* Get(); | 41 static RenderThread* Get(); |
38 | 42 |
39 RenderThread(); | 43 RenderThread(); |
40 virtual ~RenderThread(); | 44 virtual ~RenderThread(); |
41 | 45 |
42 virtual MessageLoop* GetMessageLoop() = 0; | 46 virtual MessageLoop* GetMessageLoop() = 0; |
43 virtual IPC::SyncChannel* GetChannel() = 0; | 47 virtual IPC::SyncChannel* GetChannel() = 0; |
44 virtual std::string GetLocale() = 0; | 48 virtual std::string GetLocale() = 0; |
45 virtual IPC::SyncMessageFilter* GetSyncMessageFilter() = 0; | 49 virtual IPC::SyncMessageFilter* GetSyncMessageFilter() = 0; |
| 50 virtual base::HistogramSender* GetHistogramSender() = 0; |
46 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() = 0; | 51 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() = 0; |
47 | 52 |
48 // Called to add or remove a listener for a particular message routing ID. | 53 // Called to add or remove a listener for a particular message routing ID. |
49 // These methods normally get delegated to a MessageRouter. | 54 // These methods normally get delegated to a MessageRouter. |
50 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0; | 55 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0; |
51 virtual void RemoveRoute(int32 routing_id) = 0; | 56 virtual void RemoveRoute(int32 routing_id) = 0; |
52 virtual int GenerateRoutingID() = 0; | 57 virtual int GenerateRoutingID() = 0; |
53 | 58 |
54 // These map to IPC::ChannelProxy methods. | 59 // These map to IPC::ChannelProxy methods. |
55 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; | 60 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 virtual void PreCacheFont(const LOGFONT& log_font) = 0; | 110 virtual void PreCacheFont(const LOGFONT& log_font) = 0; |
106 | 111 |
107 // Release cached font. | 112 // Release cached font. |
108 virtual void ReleaseCachedFonts() = 0; | 113 virtual void ReleaseCachedFonts() = 0; |
109 #endif | 114 #endif |
110 }; | 115 }; |
111 | 116 |
112 } // namespace content | 117 } // namespace content |
113 | 118 |
114 #endif // CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ | 119 #endif // CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ |
OLD | NEW |