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

Side by Side Diff: chrome/renderer/render_thread.h

Issue 223013: Another stab at the Chromium side of storage events. The WebKit side can be ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/render_thread.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) 2009 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"
12 #include "base/shared_memory.h" 12 #include "base/shared_memory.h"
13 #include "base/task.h" 13 #include "base/task.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "chrome/common/child_thread.h" 15 #include "chrome/common/child_thread.h"
16 #include "chrome/common/css_colors.h" 16 #include "chrome/common/css_colors.h"
17 #include "chrome/common/dom_storage_type.h"
17 #include "chrome/renderer/renderer_histogram_snapshots.h" 18 #include "chrome/renderer/renderer_histogram_snapshots.h"
18 #include "chrome/renderer/visitedlink_slave.h" 19 #include "chrome/renderer/visitedlink_slave.h"
19 20
20 class AppCacheDispatcher; 21 class AppCacheDispatcher;
21 class DBMessageFilter; 22 class DBMessageFilter;
22 class DevToolsAgentFilter; 23 class DevToolsAgentFilter;
23 class FilePath; 24 class FilePath;
24 class ListValue; 25 class ListValue;
26 class NullableString16;
25 class RenderDnsMaster; 27 class RenderDnsMaster;
26 class RendererHistogram; 28 class RendererHistogram;
27 class RendererWebKitClientImpl; 29 class RendererWebKitClientImpl;
28 class SkBitmap; 30 class SkBitmap;
29 class UserScriptSlave; 31 class UserScriptSlave;
30 class URLPattern; 32 class URLPattern;
31 33
32 struct RendererPreferences; 34 struct RendererPreferences;
33 struct WebPreferences; 35 struct WebPreferences;
34 36
37 namespace WebKit {
38 class WebStorageEventDispatcher;
39 }
40
35 // The RenderThreadBase is the minimal interface that a RenderView/Widget 41 // The RenderThreadBase is the minimal interface that a RenderView/Widget
36 // expects from a render thread. The interface basically abstracts a way to send 42 // expects from a render thread. The interface basically abstracts a way to send
37 // and receive messages. 43 // and receive messages.
38 class RenderThreadBase { 44 class RenderThreadBase {
39 public: 45 public:
40 virtual ~RenderThreadBase() {} 46 virtual ~RenderThreadBase() {}
41 47
42 virtual bool Send(IPC::Message* msg) = 0; 48 virtual bool Send(IPC::Message* msg) = 0;
43 49
44 // Called to add or remove a listener for a particular message routing ID. 50 // Called to add or remove a listener for a particular message routing ID.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 137
132 void Init(); 138 void Init();
133 139
134 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); 140 void OnUpdateVisitedLinks(base::SharedMemoryHandle table);
135 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints); 141 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints);
136 void OnResetVisitedLinks(); 142 void OnResetVisitedLinks();
137 143
138 void OnUpdateUserScripts(base::SharedMemoryHandle table); 144 void OnUpdateUserScripts(base::SharedMemoryHandle table);
139 void OnSetExtensionFunctionNames(const std::vector<std::string>& names); 145 void OnSetExtensionFunctionNames(const std::vector<std::string>& names);
140 void OnPageActionsUpdated(const std::string& extension_id, 146 void OnPageActionsUpdated(const std::string& extension_id,
141 const std::vector<std::string>& page_actions); 147 const std::vector<std::string>& page_actions);
148 void OnDOMStorageEvent(const string16& key, const NullableString16& old_value,
149 const NullableString16& new_value, const string16& origin,
150 DOMStorageType dom_storage_type);
142 void OnExtensionSetAPIPermissions( 151 void OnExtensionSetAPIPermissions(
143 const std::string& extension_id, 152 const std::string& extension_id,
144 const std::vector<std::string>& permissions); 153 const std::vector<std::string>& permissions);
145 void OnExtensionSetHostPermissions( 154 void OnExtensionSetHostPermissions(
146 const GURL& extension_url, 155 const GURL& extension_url,
147 const std::vector<URLPattern>& permissions); 156 const std::vector<URLPattern>& permissions);
148 void OnExtensionSetL10nMessages( 157 void OnExtensionSetL10nMessages(
149 const std::string& extension_id, 158 const std::string& extension_id,
150 const std::map<std::string, std::string>& l10n_messages); 159 const std::map<std::string, std::string>& l10n_messages);
151 void OnSetNextPageID(int32 next_page_id); 160 void OnSetNextPageID(int32 next_page_id);
(...skipping 28 matching lines...) Expand all
180 189
181 // These objects live solely on the render thread. 190 // These objects live solely on the render thread.
182 scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > task_factory_; 191 scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > task_factory_;
183 scoped_ptr<VisitedLinkSlave> visited_link_slave_; 192 scoped_ptr<VisitedLinkSlave> visited_link_slave_;
184 scoped_ptr<UserScriptSlave> user_script_slave_; 193 scoped_ptr<UserScriptSlave> user_script_slave_;
185 scoped_ptr<RenderDnsMaster> dns_master_; 194 scoped_ptr<RenderDnsMaster> dns_master_;
186 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_; 195 scoped_ptr<AppCacheDispatcher> appcache_dispatcher_;
187 scoped_refptr<DevToolsAgentFilter> devtools_agent_filter_; 196 scoped_refptr<DevToolsAgentFilter> devtools_agent_filter_;
188 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; 197 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_;
189 scoped_ptr<RendererWebKitClientImpl> webkit_client_; 198 scoped_ptr<RendererWebKitClientImpl> webkit_client_;
199 scoped_ptr<WebKit::WebStorageEventDispatcher> dom_storage_event_dispatcher_;
190 200
191 scoped_refptr<DBMessageFilter> db_message_filter_; 201 scoped_refptr<DBMessageFilter> db_message_filter_;
192 202
193 #if defined(OS_POSIX) 203 #if defined(OS_POSIX)
194 scoped_refptr<IPC::ChannelProxy::MessageFilter> 204 scoped_refptr<IPC::ChannelProxy::MessageFilter>
195 suicide_on_channel_error_filter_; 205 suicide_on_channel_error_filter_;
196 #endif 206 #endif
197 207
198 // If true, then a GetPlugins call is allowed to rescan the disk. 208 // If true, then a GetPlugins call is allowed to rescan the disk.
199 bool plugin_refresh_allowed_; 209 bool plugin_refresh_allowed_;
200 210
201 // Is there a pending task for doing CacheStats. 211 // Is there a pending task for doing CacheStats.
202 bool cache_stats_task_pending_; 212 bool cache_stats_task_pending_;
203 213
204 // The count of RenderWidgets running through this thread. 214 // The count of RenderWidgets running through this thread.
205 int widget_count_; 215 int widget_count_;
206 216
207 // The count of hidden RenderWidgets running through this thread. 217 // The count of hidden RenderWidgets running through this thread.
208 int hidden_widget_count_; 218 int hidden_widget_count_;
209 219
210 // The current value of the idle notification timer delay. 220 // The current value of the idle notification timer delay.
211 double idle_notification_delay_in_s_; 221 double idle_notification_delay_in_s_;
212 222
213 DISALLOW_COPY_AND_ASSIGN(RenderThread); 223 DISALLOW_COPY_AND_ASSIGN(RenderThread);
214 }; 224 };
215 225
216 #endif // CHROME_RENDERER_RENDER_THREAD_H_ 226 #endif // CHROME_RENDERER_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698