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

Side by Side Diff: webkit/glue/webthread_impl.h

Issue 8228025: Implement WebKitPlatformSupport::currentThread (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: git try Created 9 years, 2 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 | « webkit/glue/webkitplatformsupport_impl.cc ('k') | webkit/glue/webthread_impl.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef WEBKIT_GLUE_WEBTHREAD_IMPL_H_ 4 #ifndef WEBKIT_GLUE_WEBTHREAD_IMPL_H_
5 #define WEBKIT_GLUE_WEBTHREAD_IMPL_H_ 5 #define WEBKIT_GLUE_WEBTHREAD_IMPL_H_
6 6
7 #include "base/threading/thread.h" 7 #include "base/threading/thread.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebThread.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebThread.h"
10 10
11 namespace webkit_glue { 11 namespace webkit_glue {
12 12
13 class WebThreadImpl : public WebKit::WebThread { 13 class WebThreadImpl : public WebKit::WebThread {
14 public: 14 public:
15 WebThreadImpl(const char* name); 15 WebThreadImpl(const char* name);
16 virtual ~WebThreadImpl(); 16 virtual ~WebThreadImpl();
17 17
18 virtual void postTask(Task* task); 18 virtual void postTask(Task* task) OVERRIDE;
19 #ifdef WEBTHREAD_HAS_LONGLONG_CHANGE 19 virtual void postDelayedTask(Task* task, long long delay_ms) OVERRIDE;
jamesr 2011/10/18 02:26:16 i thought we were avoiding using OVERRIDE in imple
20 virtual void postDelayedTask(Task* task, long long delay_ms);
21 #else
22 virtual void postDelayedTask(Task* task, int64 delay_ms);
23 #endif
24 20
25 MessageLoop* message_loop() const { return thread_->message_loop(); } 21 MessageLoop* message_loop() const { return thread_->message_loop(); }
26 22
27 protected: 23 protected:
28 scoped_ptr<base::Thread> thread_; 24 scoped_ptr<base::Thread> thread_;
29 }; 25 };
30 26
27 class WebThreadImplForMessageLoop : public WebKit::WebThread {
28 public:
29 WebThreadImplForMessageLoop(base::MessageLoopProxy* message_loop);
30 virtual ~WebThreadImplForMessageLoop();
31
32 virtual void postTask(Task* task) OVERRIDE;
33 virtual void postDelayedTask(Task* task, long long delay_ms) OVERRIDE;
34
35 protected:
36 scoped_refptr<base::MessageLoopProxy> message_loop_;
37 };
38
31 } // namespace webkit_glue 39 } // namespace webkit_glue
32 40
33 #endif 41 #endif
OLDNEW
« no previous file with comments | « webkit/glue/webkitplatformsupport_impl.cc ('k') | webkit/glue/webthread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698