OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_RENDER_THREAD_H_ | 5 #ifndef CHROME_RENDERER_RENDER_THREAD_H_ |
6 #define CHROME_RENDERER_RENDER_THREAD_H_ | 6 #define CHROME_RENDERER_RENDER_THREAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/gfx/native_widget_types.h" | 11 #include "base/gfx/native_widget_types.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // Grabs the IPC channel name from the command line. | 63 // Grabs the IPC channel name from the command line. |
64 RenderThread(); | 64 RenderThread(); |
65 // Constructor that's used when running in single process mode. | 65 // Constructor that's used when running in single process mode. |
66 RenderThread(const std::string& channel_name); | 66 RenderThread(const std::string& channel_name); |
67 virtual ~RenderThread(); | 67 virtual ~RenderThread(); |
68 | 68 |
69 // Returns the one render thread for this process. Note that this should only | 69 // Returns the one render thread for this process. Note that this should only |
70 // be accessed when running on the render thread itself | 70 // be accessed when running on the render thread itself |
71 static RenderThread* current(); | 71 static RenderThread* current(); |
72 | 72 |
73 // Overridded from RenderThreadBase. | 73 // Overridden from RenderThreadBase. |
74 virtual bool Send(IPC::Message* msg) { | 74 virtual bool Send(IPC::Message* msg) { |
75 return ChildThread::Send(msg); | 75 return ChildThread::Send(msg); |
76 } | 76 } |
77 | 77 |
78 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) { | 78 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) { |
79 return ChildThread::AddRoute(routing_id, listener); | 79 return ChildThread::AddRoute(routing_id, listener); |
80 } | 80 } |
81 virtual void RemoveRoute(int32 routing_id) { | 81 virtual void RemoveRoute(int32 routing_id) { |
82 return ChildThread::RemoveRoute(routing_id); | 82 return ChildThread::RemoveRoute(routing_id); |
83 } | 83 } |
(...skipping 23 matching lines...) Expand all Loading... |
107 | 107 |
108 // Sends a message to the browser to close all idle connections. | 108 // Sends a message to the browser to close all idle connections. |
109 void CloseIdleConnections(); | 109 void CloseIdleConnections(); |
110 | 110 |
111 // Sends a message to the browser to enable or disable the disk cache. | 111 // Sends a message to the browser to enable or disable the disk cache. |
112 void SetCacheMode(bool enabled); | 112 void SetCacheMode(bool enabled); |
113 | 113 |
114 private: | 114 private: |
115 virtual void OnControlMessageReceived(const IPC::Message& msg); | 115 virtual void OnControlMessageReceived(const IPC::Message& msg); |
116 | 116 |
117 // Called by the thread base class | 117 // Called by the thread base class. |
118 virtual void Init(); | 118 virtual void Init(); |
119 virtual void CleanUp(); | 119 virtual void CleanUp(); |
120 | 120 |
121 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); | 121 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); |
122 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints); | 122 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints); |
123 void OnResetVisitedLinks(); | 123 void OnResetVisitedLinks(); |
124 | 124 |
125 void OnUpdateUserScripts(base::SharedMemoryHandle table); | 125 void OnUpdateUserScripts(base::SharedMemoryHandle table); |
126 void OnSetExtensionFunctionNames(const std::vector<std::string>& names); | 126 void OnSetExtensionFunctionNames(const std::vector<std::string>& names); |
| 127 void OnPageActionsUpdated(const std::string& extension_id, |
| 128 const std::vector<std::string>& page_actions); |
127 void OnSetNextPageID(int32 next_page_id); | 129 void OnSetNextPageID(int32 next_page_id); |
128 void OnCreateNewView(gfx::NativeViewId parent_hwnd, | 130 void OnCreateNewView(gfx::NativeViewId parent_hwnd, |
129 ModalDialogEvent modal_dialog_event, | 131 ModalDialogEvent modal_dialog_event, |
130 const RendererPreferences& renderer_prefs, | 132 const RendererPreferences& renderer_prefs, |
131 const WebPreferences& webkit_prefs, | 133 const WebPreferences& webkit_prefs, |
132 int32 view_id); | 134 int32 view_id); |
133 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); | 135 void OnTransferBitmap(const SkBitmap& bitmap, int resource_id); |
134 void OnSetCacheCapacities(size_t min_dead_capacity, | 136 void OnSetCacheCapacities(size_t min_dead_capacity, |
135 size_t max_dead_capacity, | 137 size_t max_dead_capacity, |
136 size_t capacity); | 138 size_t capacity); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 suicide_on_channel_error_filter_; | 177 suicide_on_channel_error_filter_; |
176 #endif | 178 #endif |
177 | 179 |
178 // If true, then a GetPlugins call is allowed to rescan the disk. | 180 // If true, then a GetPlugins call is allowed to rescan the disk. |
179 bool plugin_refresh_allowed_; | 181 bool plugin_refresh_allowed_; |
180 | 182 |
181 DISALLOW_COPY_AND_ASSIGN(RenderThread); | 183 DISALLOW_COPY_AND_ASSIGN(RenderThread); |
182 }; | 184 }; |
183 | 185 |
184 #endif // CHROME_RENDERER_RENDER_THREAD_H_ | 186 #endif // CHROME_RENDERER_RENDER_THREAD_H_ |
OLD | NEW |