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

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

Issue 155876: Revert r21117 as it caused reliability failures.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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/renderer/render_process_unittest.cc ('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/renderer/renderer_histogram_snapshots.h" 16 #include "chrome/renderer/renderer_histogram_snapshots.h"
17 #include "chrome/renderer/visitedlink_slave.h" 17 #include "chrome/renderer/visitedlink_slave.h"
18 18
19 class AppCacheDispatcher; 19 class AppCacheDispatcher;
20 class DevToolsAgentFilter; 20 class DevToolsAgentFilter;
21 class FilePath; 21 class FilePath;
22 class ListValue; 22 class ListValue;
23 23 class NotificationService;
24 class RenderDnsMaster; 24 class RenderDnsMaster;
25 class RendererHistogram; 25 class RendererHistogram;
26 class RendererWebKitClientImpl; 26 class RendererWebKitClientImpl;
27 class SkBitmap; 27 class SkBitmap;
28 class UserScriptSlave; 28 class UserScriptSlave;
29 struct ModalDialogEvent; 29 struct ModalDialogEvent;
30 struct RendererPreferences; 30 struct RendererPreferences;
31 struct WebPreferences; 31 struct WebPreferences;
32 32
33 // The RenderThreadBase is the minimal interface that a RenderView/Widget 33 // The RenderThreadBase is the minimal interface that a RenderView/Widget
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void Init(); 117 // Called by the thread base class.
118 virtual void Init();
119 virtual void CleanUp();
118 120
119 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); 121 void OnUpdateVisitedLinks(base::SharedMemoryHandle table);
120 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints); 122 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints);
121 void OnResetVisitedLinks(); 123 void OnResetVisitedLinks();
122 124
123 void OnUpdateUserScripts(base::SharedMemoryHandle table); 125 void OnUpdateUserScripts(base::SharedMemoryHandle table);
124 void OnSetExtensionFunctionNames(const std::vector<std::string>& names); 126 void OnSetExtensionFunctionNames(const std::vector<std::string>& names);
125 void OnPageActionsUpdated(const std::string& extension_id, 127 void OnPageActionsUpdated(const std::string& extension_id,
126 const std::vector<std::string>& page_actions); 128 const std::vector<std::string>& page_actions);
127 void OnSetNextPageID(int32 next_page_id); 129 void OnSetNextPageID(int32 next_page_id);
(...skipping 17 matching lines...) Expand all
145 147
146 // Gather usage statistics from the in-memory cache and inform our host. 148 // Gather usage statistics from the in-memory cache and inform our host.
147 // These functions should be call periodically so that the host can make 149 // These functions should be call periodically so that the host can make
148 // decisions about how to allocation resources using current information. 150 // decisions about how to allocation resources using current information.
149 void InformHostOfCacheStats(); 151 void InformHostOfCacheStats();
150 152
151 // We initialize WebKit as late as possible. 153 // We initialize WebKit as late as possible.
152 void EnsureWebKitInitialized(); 154 void EnsureWebKitInitialized();
153 155
154 // These objects live solely on the render thread. 156 // These objects live solely on the render thread.
157 scoped_ptr<VisitedLinkSlave> visited_link_slave_;
158
159 scoped_ptr<UserScriptSlave> user_script_slave_;
160
161 scoped_ptr<RenderDnsMaster> dns_master_;
162
163 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_;
164
155 scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > cache_stats_factory_; 165 scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > cache_stats_factory_;
156 scoped_ptr<VisitedLinkSlave> visited_link_slave_; 166
157 scoped_ptr<UserScriptSlave> user_script_slave_; 167 scoped_ptr<NotificationService> notification_service_;
158 scoped_ptr<RenderDnsMaster> dns_master_; 168
169 scoped_ptr<RendererWebKitClientImpl> webkit_client_;
170
159 scoped_ptr<AppCacheDispatcher> app_cache_dispatcher_; 171 scoped_ptr<AppCacheDispatcher> app_cache_dispatcher_;
172
160 scoped_refptr<DevToolsAgentFilter> devtools_agent_filter_; 173 scoped_refptr<DevToolsAgentFilter> devtools_agent_filter_;
161 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_;
162 scoped_ptr<RendererWebKitClientImpl> webkit_client_;
163 174
164 #if defined(OS_POSIX) 175 #if defined(OS_POSIX)
165 scoped_refptr<IPC::ChannelProxy::MessageFilter> 176 scoped_refptr<IPC::ChannelProxy::MessageFilter>
166 suicide_on_channel_error_filter_; 177 suicide_on_channel_error_filter_;
167 #endif 178 #endif
168 179
169 // 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.
170 bool plugin_refresh_allowed_; 181 bool plugin_refresh_allowed_;
171 182
172 DISALLOW_COPY_AND_ASSIGN(RenderThread); 183 DISALLOW_COPY_AND_ASSIGN(RenderThread);
173 }; 184 };
174 185
175 #endif // CHROME_RENDERER_RENDER_THREAD_H_ 186 #endif // CHROME_RENDERER_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « chrome/renderer/render_process_unittest.cc ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698