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

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

Issue 155845: DOM Storage: Add browser-process IPC code + tweak the WebKit Thread. (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 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 21342)
+++ chrome/browser/in_process_webkit/webkit_thread.h (working copy)
@@ -35,6 +35,15 @@
return webkit_thread_->message_loop();
}
+ // 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 {
@@ -58,6 +67,11 @@
// 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);
};
« 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