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

Unified Diff: sky/viewer/platform/webthread_impl.h

Issue 673033002: Remove WebThread (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/viewer/platform/platform_impl.cc ('k') | sky/viewer/platform/webthread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/viewer/platform/webthread_impl.h
diff --git a/sky/viewer/platform/webthread_impl.h b/sky/viewer/platform/webthread_impl.h
deleted file mode 100644
index 8d0d10b9732d001a7e7206e02d45d8ea340ce7b1..0000000000000000000000000000000000000000
--- a/sky/viewer/platform/webthread_impl.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SKY_VIEWER_PLATFORM_WEBTHREAD_IMPL_H_
-#define SKY_VIEWER_PLATFORM_WEBTHREAD_IMPL_H_
-
-#include <map>
-
-#include "base/memory/scoped_ptr.h"
-#include "base/threading/thread.h"
-#include "sky/engine/public/platform/WebThread.h"
-
-namespace sky {
-
-class WebThreadBase : public blink::WebThread {
- public:
- virtual ~WebThreadBase();
-
- virtual void addTaskObserver(TaskObserver* observer);
- virtual void removeTaskObserver(TaskObserver* observer);
-
- virtual bool isCurrentThread() const = 0;
- virtual blink::PlatformThreadId threadId() const = 0;
-
- protected:
- WebThreadBase();
-
- private:
- class TaskObserverAdapter;
- class SignalObserverAdapter;
-
- struct Adaptors {
- TaskObserverAdapter* task_adaptor = nullptr;
- SignalObserverAdapter* signal_adaptor = nullptr;
- };
-
- typedef std::map<TaskObserver*, Adaptors> ObserverMap;
- ObserverMap observer_map_;
-};
-
-class WebThreadImpl : public WebThreadBase {
- public:
- explicit WebThreadImpl(const char* name);
- virtual ~WebThreadImpl();
-
- virtual void postTask(Task* task);
- virtual void postDelayedTask(Task* task, long long delay_ms);
-
- virtual void enterRunLoop();
- virtual void exitRunLoop();
-
- base::MessageLoop* message_loop() const { return thread_->message_loop(); }
-
- virtual bool isCurrentThread() const;
- virtual blink::PlatformThreadId threadId() const;
-
- private:
- scoped_ptr<base::Thread> thread_;
-};
-
-class WebThreadImplForMessageLoop : public WebThreadBase {
- public:
- explicit WebThreadImplForMessageLoop(
- base::MessageLoopProxy* message_loop);
- virtual ~WebThreadImplForMessageLoop();
-
- virtual void postTask(Task* task);
- virtual void postDelayedTask(Task* task, long long delay_ms);
-
- virtual void enterRunLoop();
- virtual void exitRunLoop();
-
- private:
- virtual bool isCurrentThread() const;
- virtual blink::PlatformThreadId threadId() const;
-
- scoped_refptr<base::MessageLoopProxy> message_loop_;
- blink::PlatformThreadId thread_id_;
-};
-
-} // namespace sky
-
-#endif // SKY_VIEWER_PLATFORM_WEBTHREAD_IMPL_H_
« no previous file with comments | « sky/viewer/platform/platform_impl.cc ('k') | sky/viewer/platform/webthread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698