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

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

Issue 3151029: Add a file thread to the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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') | 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) 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 <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 29 matching lines...) Expand all
40 class URLPattern; 40 class URLPattern;
41 class WebDatabaseObserverImpl; 41 class WebDatabaseObserverImpl;
42 42
43 struct ContentSettings; 43 struct ContentSettings;
44 struct RendererPreferences; 44 struct RendererPreferences;
45 struct ViewMsg_DOMStorageEvent_Params; 45 struct ViewMsg_DOMStorageEvent_Params;
46 struct ViewMsg_ExtensionExtentsUpdated_Params; 46 struct ViewMsg_ExtensionExtentsUpdated_Params;
47 struct ViewMsg_New_Params; 47 struct ViewMsg_New_Params;
48 struct WebPreferences; 48 struct WebPreferences;
49 49
50 namespace base {
51 class MessageLoopProxy;
52 class Thread;
53 }
54
50 namespace IPC { 55 namespace IPC {
51 struct ChannelHandle; 56 struct ChannelHandle;
52 } 57 }
53 58
54 namespace WebKit { 59 namespace WebKit {
55 class WebStorageEventDispatcher; 60 class WebStorageEventDispatcher;
56 } 61 }
57 62
58 // The RenderThreadBase is the minimal interface that a RenderView/Widget 63 // The RenderThreadBase is the minimal interface that a RenderView/Widget
59 // expects from a render thread. The interface basically abstracts a way to send 64 // expects from a render thread. The interface basically abstracts a way to send
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 GpuChannelHost* GetGpuChannel(); 226 GpuChannelHost* GetGpuChannel();
222 227
223 // Returns the extension ID that the given URL is a part of, or empty if 228 // Returns the extension ID that the given URL is a part of, or empty if
224 // none. This includes web URLs that are part of an extension's web extent. 229 // none. This includes web URLs that are part of an extension's web extent.
225 // TODO(mpcomplete): this doesn't feel like it belongs here. Find a better 230 // TODO(mpcomplete): this doesn't feel like it belongs here. Find a better
226 // place. 231 // place.
227 std::string GetExtensionIdByURL(const GURL& url); 232 std::string GetExtensionIdByURL(const GURL& url);
228 233
229 std::string GetExtensionIdByBrowseExtent(const GURL& url); 234 std::string GetExtensionIdByBrowseExtent(const GURL& url);
230 235
236 // Returns a MessageLoopProxy instance corresponding to the message loop
237 // of the thread on which file operations should be run. Must be called
238 // on the renderer's main thread.
239 scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy();
240
231 private: 241 private:
232 virtual void OnControlMessageReceived(const IPC::Message& msg); 242 virtual void OnControlMessageReceived(const IPC::Message& msg);
233 243
234 void Init(); 244 void Init();
235 245
236 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); 246 void OnUpdateVisitedLinks(base::SharedMemoryHandle table);
237 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints); 247 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints);
238 void OnResetVisitedLinks(); 248 void OnResetVisitedLinks();
239 void OnSetZoomLevelForCurrentURL(const GURL& url, int zoom_level); 249 void OnSetZoomLevelForCurrentURL(const GURL& url, int zoom_level);
240 void OnSetContentSettingsForCurrentURL( 250 void OnSetContentSettingsForCurrentURL(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 base::RepeatingTimer<RenderThread> forced_idle_timer_; 369 base::RepeatingTimer<RenderThread> forced_idle_timer_;
360 370
361 // The channel from the renderer process to the GPU process. 371 // The channel from the renderer process to the GPU process.
362 scoped_refptr<GpuChannelHost> gpu_channel_; 372 scoped_refptr<GpuChannelHost> gpu_channel_;
363 373
364 // A list of extension web extents, which tells us which URLs belong to an 374 // A list of extension web extents, which tells us which URLs belong to an
365 // installed app. 375 // installed app.
366 struct ExtensionInfo; 376 struct ExtensionInfo;
367 std::vector<ExtensionInfo> extension_extents_; 377 std::vector<ExtensionInfo> extension_extents_;
368 378
379 // A lazily initiated thread on which file operations are run.
380 scoped_ptr<base::Thread> file_thread_;
381
369 DISALLOW_COPY_AND_ASSIGN(RenderThread); 382 DISALLOW_COPY_AND_ASSIGN(RenderThread);
370 }; 383 };
371 384
372 #endif // CHROME_RENDERER_RENDER_THREAD_H_ 385 #endif // CHROME_RENDERER_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698