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

Unified Diff: chrome/browser/in_process_webkit/webkit_thread.h

Issue 432007: Start the WebKit thread when we initialize the resource dispatcher host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/in_process_webkit/webkit_thread.h
===================================================================
--- chrome/browser/in_process_webkit/webkit_thread.h (revision 32803)
+++ chrome/browser/in_process_webkit/webkit_thread.h (working copy)
@@ -14,21 +14,15 @@
class BrowserWebKitClientImpl;
-// This is an object that represents WebKit's "main" thread within the browser
-// process. It should be instantiated and destroyed on the UI thread
-// before/after the IO thread is created/destroyed. All other usage should be
-// on the IO thread. If the browser is being run in --single-process mode, a
-// thread will never be spun up.
+// This creates a WebKit main thread on instantiation (if not in
+// --single-process mode) on construction and kills it on deletion.
class WebKitThread {
public:
// Called from the UI thread.
WebKitThread();
~WebKitThread();
+ void Initialize();
- // Creates the WebKit thread if it hasn't been already created. Only call
- // from the IO thread. Only do fast-path work here.
- void EnsureInitialized();
-
private:
// Must be private so that we can carefully control its lifetime.
class InternalWebKitThread : public ChromeThread {
@@ -45,12 +39,7 @@
scoped_ptr<BrowserWebKitClientImpl> webkit_client_;
};
- // Returns the WebKit thread's message loop or NULL if we're in
- // --single-process mode. Do slow-path initialization work here.
- MessageLoop* InitializeThread();
-
- // Pointer to the actual WebKitThread. NULL if not yet started. Only modify
- // from the IO thread while the WebKit thread is not running.
+ // Pointer to the actual WebKitThread.
scoped_ptr<InternalWebKitThread> webkit_thread_;
DISALLOW_COPY_AND_ASSIGN(WebKitThread);
« no previous file with comments | « chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc ('k') | chrome/browser/in_process_webkit/webkit_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698