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

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

Issue 6750014: Add a RenderProcessObserver. For now this will be primarily used to filter control messages, so ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | « no previous file | chrome/renderer/render_thread.cc » ('j') | chrome/renderer/render_thread.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/observer_list.h"
13 #include "base/shared_memory.h" 14 #include "base/shared_memory.h"
14 #include "base/time.h" 15 #include "base/time.h"
15 #include "base/timer.h" 16 #include "base/timer.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "chrome/common/extensions/extension_set.h" 18 #include "chrome/common/extensions/extension_set.h"
18 #include "chrome/renderer/chrome_content_renderer_client.h" 19 #include "chrome/renderer/chrome_content_renderer_client.h"
19 #include "chrome/renderer/visitedlink_slave.h" 20 #include "chrome/renderer/visitedlink_slave.h"
20 #include "content/common/child_thread.h" 21 #include "content/common/child_thread.h"
21 #include "content/common/css_colors.h" 22 #include "content/common/css_colors.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 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
25 26
26 class AppCacheDispatcher; 27 class AppCacheDispatcher;
27 class CookieMessageFilter; 28 class CookieMessageFilter;
28 class DBMessageFilter; 29 class DBMessageFilter;
29 class DevToolsAgentFilter; 30 class DevToolsAgentFilter;
30 class ExtensionSet; 31 class ExtensionSet;
31 class FilePath; 32 class FilePath;
32 class GpuChannelHost; 33 class GpuChannelHost;
33 class IndexedDBDispatcher; 34 class IndexedDBDispatcher;
34 class ListValue; 35 class ListValue;
35 class RendererHistogram; 36 class RendererHistogram;
36 class RendererHistogramSnapshots; 37 class RendererHistogramSnapshots;
38 class RenderProcessObserver;
37 class RendererNetPredictor; 39 class RendererNetPredictor;
38 class RendererWebKitClientImpl; 40 class RendererWebKitClientImpl;
39 class SpellCheck; 41 class SpellCheck;
40 class SkBitmap; 42 class SkBitmap;
41 class UserScriptSlave; 43 class UserScriptSlave;
42 class URLPattern; 44 class URLPattern;
43 class WebDatabaseObserverImpl; 45 class WebDatabaseObserverImpl;
44 46
45 struct ContentSettings; 47 struct ContentSettings;
46 struct RendererPreferences; 48 struct RendererPreferences;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 virtual bool Send(IPC::Message* msg); 164 virtual bool Send(IPC::Message* msg);
163 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener); 165 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener);
164 virtual void RemoveRoute(int32 routing_id); 166 virtual void RemoveRoute(int32 routing_id);
165 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter); 167 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter);
166 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); 168 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter);
167 virtual void WidgetHidden(); 169 virtual void WidgetHidden();
168 virtual void WidgetRestored(); 170 virtual void WidgetRestored();
169 virtual bool IsExtensionProcess() const; 171 virtual bool IsExtensionProcess() const;
170 virtual bool IsIncognitoProcess() const; 172 virtual bool IsIncognitoProcess() const;
171 173
174 void AddObserver(RenderProcessObserver* observer);
175 void RemoveObserver(RenderProcessObserver* observer);
176
172 // These methods modify how the next message is sent. Normally, when sending 177 // These methods modify how the next message is sent. Normally, when sending
173 // a synchronous message that runs a nested message loop, we need to suspend 178 // a synchronous message that runs a nested message loop, we need to suspend
174 // callbacks into WebKit. This involves disabling timers and deferring 179 // callbacks into WebKit. This involves disabling timers and deferring
175 // resource loads. However, there are exceptions when we need to customize 180 // resource loads. However, there are exceptions when we need to customize
176 // the behavior. 181 // the behavior.
177 void DoNotSuspendWebKitSharedTimer(); 182 void DoNotSuspendWebKitSharedTimer();
178 void DoNotNotifyWebKitOfModalLoop(); 183 void DoNotNotifyWebKitOfModalLoop();
179 184
180 VisitedLinkSlave* visited_link_slave() const { 185 VisitedLinkSlave* visited_link_slave() const {
181 return visited_link_slave_.get(); 186 return visited_link_slave_.get();
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // 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
407 // is true if the extension should be restricted to extension-related 412 // is true if the extension should be restricted to extension-related
408 // contexts. 413 // contexts.
409 std::map<std::string, bool> v8_extensions_; 414 std::map<std::string, bool> v8_extensions_;
410 415
411 // Contains all loaded extensions. 416 // Contains all loaded extensions.
412 ExtensionSet extensions_; 417 ExtensionSet extensions_;
413 418
414 chrome::ChromeContentRendererClient renderer_client_; 419 chrome::ChromeContentRendererClient renderer_client_;
415 420
421 ObserverList<RenderProcessObserver> observers_;
422
416 DISALLOW_COPY_AND_ASSIGN(RenderThread); 423 DISALLOW_COPY_AND_ASSIGN(RenderThread);
417 }; 424 };
418 425
419 #endif // CHROME_RENDERER_RENDER_THREAD_H_ 426 #endif // CHROME_RENDERER_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/render_thread.cc » ('j') | chrome/renderer/render_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698