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

Unified Diff: ppapi/proxy/ppapi_proxy_test.h

Issue 1174543002: ppapi: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix V8VarConverterTest. Created 5 years, 6 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 | « ppapi/proxy/plugin_message_filter.cc ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppapi_proxy_test.h
diff --git a/ppapi/proxy/ppapi_proxy_test.h b/ppapi/proxy/ppapi_proxy_test.h
index e9618743c75deca7546f8f167cbe039c6aa9a79e..8932b22a341539219a19ce99196f33d10c5ed700 100644
--- a/ppapi/proxy/ppapi_proxy_test.h
+++ b/ppapi/proxy/ppapi_proxy_test.h
@@ -8,7 +8,6 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/task_runner.h"
#include "base/threading/simple_thread.h"
@@ -26,8 +25,8 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
-class MessageLoopProxy;
class RunLoop;
+class SingleThreadTaskRunner;
}
namespace ppapi {
@@ -59,10 +58,11 @@ class ProxyTestHarnessBase {
virtual void SetUpHarness() = 0;
// Set up the harness using a real IPC channel.
- virtual void SetUpHarnessWithChannel(const IPC::ChannelHandle& channel_handle,
- base::MessageLoopProxy* ipc_message_loop,
- base::WaitableEvent* shutdown_event,
- bool is_client) = 0;
+ virtual void SetUpHarnessWithChannel(
+ const IPC::ChannelHandle& channel_handle,
+ base::SingleThreadTaskRunner* ipc_task_runner,
+ base::WaitableEvent* shutdown_event,
+ bool is_client) = 0;
virtual void TearDownHarness() = 0;
@@ -110,21 +110,22 @@ class PluginProxyTestHarness : public ProxyTestHarnessBase {
virtual PpapiGlobals* GetGlobals();
virtual Dispatcher* GetDispatcher();
virtual void SetUpHarness();
- virtual void SetUpHarnessWithChannel(const IPC::ChannelHandle& channel_handle,
- base::MessageLoopProxy* ipc_message_loop,
- base::WaitableEvent* shutdown_event,
- bool is_client);
+ virtual void SetUpHarnessWithChannel(
+ const IPC::ChannelHandle& channel_handle,
+ base::SingleThreadTaskRunner* ipc_task_runner,
+ base::WaitableEvent* shutdown_event,
+ bool is_client);
virtual void TearDownHarness();
class PluginDelegateMock : public PluginDispatcher::PluginDelegate,
public PluginProxyDelegate {
public:
- PluginDelegateMock() : ipc_message_loop_(NULL), shutdown_event_() {}
+ PluginDelegateMock() : ipc_task_runner_(NULL), shutdown_event_() {}
~PluginDelegateMock() override {}
- void Init(base::MessageLoopProxy* ipc_message_loop,
+ void Init(base::SingleThreadTaskRunner* ipc_task_runner,
base::WaitableEvent* shutdown_event) {
- ipc_message_loop_ = ipc_message_loop;
+ ipc_task_runner_ = ipc_task_runner;
shutdown_event_ = shutdown_event;
}
@@ -160,7 +161,7 @@ class PluginProxyTestHarness : public ProxyTestHarnessBase {
const Preferences& prefs) override;
private:
- base::MessageLoopProxy* ipc_message_loop_; // Weak
+ base::SingleThreadTaskRunner* ipc_task_runner_; // Weak
base::WaitableEvent* shutdown_event_; // Weak
std::set<PP_Instance> instance_id_set_;
IPC::Sender* browser_sender_;
@@ -225,7 +226,7 @@ class PluginProxyMultiThreadTest
protected:
scoped_refptr<MessageLoopResource> secondary_thread_message_loop_;
- scoped_refptr<base::MessageLoopProxy> main_thread_message_loop_proxy_;
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
private:
// base::DelegateSimpleThread::Delegate implementation.
@@ -257,26 +258,26 @@ class HostProxyTestHarness : public ProxyTestHarnessBase {
virtual PpapiGlobals* GetGlobals();
virtual Dispatcher* GetDispatcher();
virtual void SetUpHarness();
- virtual void SetUpHarnessWithChannel(const IPC::ChannelHandle& channel_handle,
- base::MessageLoopProxy* ipc_message_loop,
- base::WaitableEvent* shutdown_event,
- bool is_client);
+ virtual void SetUpHarnessWithChannel(
+ const IPC::ChannelHandle& channel_handle,
+ base::SingleThreadTaskRunner* ipc_task_runner,
+ base::WaitableEvent* shutdown_event,
+ bool is_client);
virtual void TearDownHarness();
class DelegateMock : public ProxyChannel::Delegate {
public:
- DelegateMock() : ipc_message_loop_(NULL), shutdown_event_(NULL) {
- }
+ DelegateMock() : ipc_task_runner_(NULL), shutdown_event_(NULL) {}
~DelegateMock() override {}
- void Init(base::MessageLoopProxy* ipc_message_loop,
+ void Init(base::SingleThreadTaskRunner* ipc_task_runner,
base::WaitableEvent* shutdown_event) {
- ipc_message_loop_ = ipc_message_loop;
+ ipc_task_runner_ = ipc_task_runner;
shutdown_event_ = shutdown_event;
}
// ProxyChannel::Delegate implementation.
- base::MessageLoopProxy* GetIPCTaskRunner() override;
+ base::SingleThreadTaskRunner* GetIPCTaskRunner() override;
base::WaitableEvent* GetShutdownEvent() override;
IPC::PlatformFileForTransit ShareHandleWithRemote(
base::PlatformFile handle,
@@ -287,7 +288,7 @@ class HostProxyTestHarness : public ProxyTestHarnessBase {
base::ProcessId remote_pid) override;
private:
- base::MessageLoopProxy* ipc_message_loop_; // Weak
+ base::SingleThreadTaskRunner* ipc_task_runner_; // Weak
base::WaitableEvent* shutdown_event_; // Weak
DISALLOW_COPY_AND_ASSIGN(DelegateMock);
« no previous file with comments | « ppapi/proxy/plugin_message_filter.cc ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698