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

Unified Diff: webkit/glue/webthread_impl.h

Issue 9167034: Add support for Run + Quit to WebKit::WebThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update with MessageLoop-agnostic API names Created 8 years, 11 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: webkit/glue/webthread_impl.h
diff --git a/webkit/glue/webthread_impl.h b/webkit/glue/webthread_impl.h
index e39d6bf65afdd87608b46dd3922877092349741c..4c15a7eecea36c47edaec367ef7be3ce4d3ed2cc 100644
--- a/webkit/glue/webthread_impl.h
+++ b/webkit/glue/webthread_impl.h
@@ -7,6 +7,7 @@
#include <map>
#include "base/threading/thread.h"
+#include "base/message_loop.h"
#include "base/memory/scoped_ptr.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebThread.h"
#include "webkit/glue/webkit_glue_export.h"
@@ -40,6 +41,9 @@ class WebThreadImpl : public WebThreadBase {
virtual void postTask(Task* task) OVERRIDE;
virtual void postDelayedTask(Task* task, long long delay_ms) OVERRIDE;
+ virtual void enterRunLoop();
+ virtual void exitRunLoop();
+
MessageLoop* message_loop() const { return thread_->message_loop(); }
private:
@@ -49,15 +53,20 @@ class WebThreadImpl : public WebThreadBase {
class WebThreadImplForMessageLoop : public WebThreadBase {
public:
- explicit WebThreadImplForMessageLoop(base::MessageLoopProxy* message_loop);
+ WebThreadImplForMessageLoop(MessageLoop* message_loop,
+ base::PlatformThreadId thread_id);
virtual ~WebThreadImplForMessageLoop();
virtual void postTask(Task* task) OVERRIDE;
virtual void postDelayedTask(Task* task, long long delay_ms) OVERRIDE;
+ virtual void enterRunLoop();
+ virtual void exitRunLoop();
+
private:
virtual bool IsCurrentThread() const OVERRIDE;
- scoped_refptr<base::MessageLoopProxy> message_loop_;
+ MessageLoop* message_loop_;
+ base::PlatformThreadId thread_id_;
};
} // namespace webkit_glue

Powered by Google App Engine
This is Rietveld 408576698