| Index: chrome/browser/in_process_webkit/webkit_thread.h
|
| ===================================================================
|
| --- chrome/browser/in_process_webkit/webkit_thread.h (revision 30037)
|
| +++ chrome/browser/in_process_webkit/webkit_thread.h (working copy)
|
| @@ -18,32 +18,17 @@
|
| // 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, and GetMessageLoop() will always return NULL.
|
| +// thread will never be spun up.
|
| class WebKitThread {
|
| public:
|
| // Called from the UI thread.
|
| WebKitThread();
|
| ~WebKitThread();
|
|
|
| - // Returns the message loop for the WebKit thread unless we're in
|
| - // --single-processuntil mode, in which case it'll return NULL. Only call
|
| + // Creates the WebKit thread if it hasn't been already created. Only call
|
| // from the IO thread. Only do fast-path work here.
|
| - MessageLoop* GetMessageLoop() {
|
| - DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
|
| - if (!webkit_thread_.get())
|
| - return InitializeThread();
|
| - return webkit_thread_->message_loop();
|
| - }
|
| + void EnsureInitialized();
|
|
|
| - // Called from the IO thread. Notifies us that it's no longer safe to post
|
| - // tasks to the IO thread.
|
| - void Shutdown();
|
| -
|
| - // Post a task to the IO thread if we haven't yet been told to shut down.
|
| - // Only call from the WebKit thread.
|
| - bool PostIOThreadTask(const tracked_objects::Location& from_here,
|
| - Task* task);
|
| -
|
| private:
|
| // Must be private so that we can carefully control its lifetime.
|
| class InternalWebKitThread : public ChromeThread {
|
| @@ -68,11 +53,6 @@
|
| // from the IO thread while the WebKit thread is not running.
|
| scoped_ptr<InternalWebKitThread> webkit_thread_;
|
|
|
| - // A pointer to the IO message loop. This is nulled out when Shutdown() is
|
| - // called. Only access under the io_message_loop_lock_.
|
| - MessageLoop* io_message_loop_;
|
| - Lock io_message_loop_lock_;
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(WebKitThread);
|
| };
|
|
|
|
|