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

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

Issue 6242010: Refactor away most of ExtensionRendererInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove more deadness Created 9 years, 11 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/shared_memory.h" 13 #include "base/shared_memory.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "base/timer.h" 15 #include "base/timer.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "chrome/common/child_thread.h" 17 #include "chrome/common/child_thread.h"
18 #include "chrome/common/css_colors.h" 18 #include "chrome/common/css_colors.h"
19 #include "chrome/common/gpu_info.h" 19 #include "chrome/common/gpu_info.h"
20 #include "chrome/renderer/extensions/extension_renderer_info.h"
20 #include "chrome/renderer/visitedlink_slave.h" 21 #include "chrome/renderer/visitedlink_slave.h"
21 #include "gfx/native_widget_types.h" 22 #include "gfx/native_widget_types.h"
22 #include "ipc/ipc_channel_proxy.h" 23 #include "ipc/ipc_channel_proxy.h"
23 #include "ipc/ipc_platform_file.h" 24 #include "ipc/ipc_platform_file.h"
24 25
25 class AppCacheDispatcher; 26 class AppCacheDispatcher;
26 class CookieMessageFilter; 27 class CookieMessageFilter;
27 class DBMessageFilter; 28 class DBMessageFilter;
28 class DevToolsAgentFilter; 29 class DevToolsAgentFilter;
29 class FilePath; 30 class FilePath;
30 class GpuChannelHost; 31 class GpuChannelHost;
31 class IndexedDBDispatcher; 32 class IndexedDBDispatcher;
32 class ListValue; 33 class ListValue;
33 class RendererHistogram; 34 class RendererHistogram;
34 class RendererHistogramSnapshots; 35 class RendererHistogramSnapshots;
35 class RendererNetPredictor; 36 class RendererNetPredictor;
36 class RendererWebKitClientImpl; 37 class RendererWebKitClientImpl;
37 class SpellCheck; 38 class SpellCheck;
38 class SkBitmap; 39 class SkBitmap;
39 class UserScriptSlave; 40 class UserScriptSlave;
40 class URLPattern; 41 class URLPattern;
41 class WebDatabaseObserverImpl; 42 class WebDatabaseObserverImpl;
42 43
43 struct ContentSettings; 44 struct ContentSettings;
44 struct RendererPreferences; 45 struct RendererPreferences;
45 struct DOMStorageMsg_Event_Params; 46 struct DOMStorageMsg_Event_Params;
46 struct ViewMsg_ExtensionsUpdated_Params; 47 struct ViewMsg_ExtensionLoaded_Params;
47 struct ViewMsg_New_Params; 48 struct ViewMsg_New_Params;
48 struct WebPreferences; 49 struct WebPreferences;
49 50
50 namespace base { 51 namespace base {
51 class MessageLoopProxy; 52 class MessageLoopProxy;
52 template<class T> class ScopedCallbackFactory; 53 template<class T> class ScopedCallbackFactory;
53 class Thread; 54 class Thread;
54 } 55 }
55 56
56 namespace IPC { 57 namespace IPC {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 195 }
195 196
196 // Returns the phishing Scorer object, or NULL if a model has not been passed 197 // Returns the phishing Scorer object, or NULL if a model has not been passed
197 // in from the browser yet. 198 // in from the browser yet.
198 const safe_browsing::Scorer* phishing_scorer() const { 199 const safe_browsing::Scorer* phishing_scorer() const {
199 return phishing_scorer_.get(); 200 return phishing_scorer_.get();
200 } 201 }
201 202
202 bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; } 203 bool plugin_refresh_allowed() const { return plugin_refresh_allowed_; }
203 204
205 ExtensionRendererInfo* extensions() { return &extensions_; }
206
204 // Do DNS prefetch resolution of a hostname. 207 // Do DNS prefetch resolution of a hostname.
205 void Resolve(const char* name, size_t length); 208 void Resolve(const char* name, size_t length);
206 209
207 // Send all the Histogram data to browser. 210 // Send all the Histogram data to browser.
208 void SendHistograms(int sequence_number); 211 void SendHistograms(int sequence_number);
209 212
210 // Invokes InformHostOfCacheStats after a short delay. Used to move this 213 // Invokes InformHostOfCacheStats after a short delay. Used to move this
211 // bookkeeping operation off the critical latency path. 214 // bookkeeping operation off the critical latency path.
212 void InformHostOfCacheStatsLater(); 215 void InformHostOfCacheStatsLater();
213 216
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void Init(); 262 void Init();
260 263
261 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); 264 void OnUpdateVisitedLinks(base::SharedMemoryHandle table);
262 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints); 265 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints);
263 void OnResetVisitedLinks(); 266 void OnResetVisitedLinks();
264 void OnSetZoomLevelForCurrentURL(const GURL& url, double zoom_level); 267 void OnSetZoomLevelForCurrentURL(const GURL& url, double zoom_level);
265 void OnSetContentSettingsForCurrentURL( 268 void OnSetContentSettingsForCurrentURL(
266 const GURL& url, const ContentSettings& content_settings); 269 const GURL& url, const ContentSettings& content_settings);
267 void OnUpdateUserScripts(base::SharedMemoryHandle table); 270 void OnUpdateUserScripts(base::SharedMemoryHandle table);
268 void OnSetExtensionFunctionNames(const std::vector<std::string>& names); 271 void OnSetExtensionFunctionNames(const std::vector<std::string>& names);
269 void OnExtensionsUpdated( 272 void OnExtensionLoaded(const ViewMsg_ExtensionLoaded_Params& params);
270 const ViewMsg_ExtensionsUpdated_Params& params); 273 void OnExtensionUnloaded(const std::string& id);
271 void OnPageActionsUpdated(const std::string& extension_id, 274 void OnPageActionsUpdated(const std::string& extension_id,
272 const std::vector<std::string>& page_actions); 275 const std::vector<std::string>& page_actions);
273 void OnDOMStorageEvent(const DOMStorageMsg_Event_Params& params); 276 void OnDOMStorageEvent(const DOMStorageMsg_Event_Params& params);
274 void OnExtensionSetAPIPermissions( 277 void OnExtensionSetAPIPermissions(
275 const std::string& extension_id, 278 const std::string& extension_id,
276 const std::set<std::string>& permissions); 279 const std::set<std::string>& permissions);
277 void OnExtensionSetHostPermissions( 280 void OnExtensionSetHostPermissions(
278 const GURL& extension_url, 281 const GURL& extension_url,
279 const std::vector<URLPattern>& permissions); 282 const std::vector<URLPattern>& permissions);
280 void OnSetNextPageID(int32 next_page_id); 283 void OnSetNextPageID(int32 next_page_id);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 scoped_refptr<GpuChannelHost> gpu_channel_; 406 scoped_refptr<GpuChannelHost> gpu_channel_;
404 407
405 // A lazily initiated thread on which file operations are run. 408 // A lazily initiated thread on which file operations are run.
406 scoped_ptr<base::Thread> file_thread_; 409 scoped_ptr<base::Thread> file_thread_;
407 410
408 // Map of registered v8 extensions. The key is the extension name. The value 411 // Map of registered v8 extensions. The key is the extension name. The value
409 // is true if the extension should be restricted to extension-related 412 // is true if the extension should be restricted to extension-related
410 // contexts. 413 // contexts.
411 std::map<std::string, bool> v8_extensions_; 414 std::map<std::string, bool> v8_extensions_;
412 415
416 // Contains all loaded extensions.
417 ExtensionRendererInfo extensions_;
418
413 DISALLOW_COPY_AND_ASSIGN(RenderThread); 419 DISALLOW_COPY_AND_ASSIGN(RenderThread);
414 }; 420 };
415 421
416 #endif // CHROME_RENDERER_RENDER_THREAD_H_ 422 #endif // CHROME_RENDERER_RENDER_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698