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

Unified Diff: ash/test/test_metro_viewer_process_host.h

Issue 14629025: Create MetroViewerProcessHost as a common base for TestMetroViewerProcessHost and ChromeMetroViewer… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge before dcommit Created 7 years, 7 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 | « ash/test/ash_test_base.cc ('k') | ash/test/test_metro_viewer_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/test_metro_viewer_process_host.h
diff --git a/ash/test/test_metro_viewer_process_host.h b/ash/test/test_metro_viewer_process_host.h
index f52230b7939882ed9a9cf2f1b63e59a33a8a38f0..0f241695688897450de71fe3b208559ba95706d7 100644
--- a/ash/test/test_metro_viewer_process_host.h
+++ b/ash/test/test_metro_viewer_process_host.h
@@ -7,69 +7,25 @@
#include <string>
-#include "base/memory/scoped_ptr.h"
-#include "base/synchronization/waitable_event.h"
-#include "base/threading/non_thread_safe.h"
-#include "base/threading/thread.h"
-#include "ipc/ipc_channel_proxy.h"
-#include "ipc/ipc_listener.h"
-#include "ipc/ipc_sender.h"
-#include "ui/gfx/native_widget_types.h"
+#include "win8/viewer/metro_viewer_process_host.h"
class AcceleratedSurface;
namespace ash {
namespace test {
-class TestMetroViewerProcessHost : public IPC::Listener,
- public IPC::Sender,
- public base::NonThreadSafe {
+class TestMetroViewerProcessHost : public win8::MetroViewerProcessHost {
public:
- explicit TestMetroViewerProcessHost(const std::string& ipc_channel_name);
+ TestMetroViewerProcessHost(const std::string& ipc_channel_name,
+ base::SingleThreadTaskRunner* ipc_task_runner);
virtual ~TestMetroViewerProcessHost();
- // Launches the viewer process associated with the given |app_user_model_id|
- // and blocks until that viewer process connects or until a timeout is
- // reached. Returns true if the viewer process connects before the timeout is
- // reached.
- bool LaunchViewerAndWaitForConnection(
- const base::string16& app_user_model_id);
-
- // IPC::Sender implementation:
- virtual bool Send(IPC::Message* msg) OVERRIDE;
-
- // IPC::Listener implementation:
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
- virtual void OnChannelError() OVERRIDE;
-
bool closed_unexpectedly() { return closed_unexpectedly_; }
private:
- void OnSetTargetSurface(gfx::NativeViewId target_surface);
-
- void NotifyChannelConnected();
-
- // Inner message filter used to handle connection event on the IPC channel
- // proxy's background thread. This prevents consumers of
- // TestMetroViewerProcessHost from having to pump messages on their own
- // message loop.
- class InternalMessageFilter : public IPC::ChannelProxy::MessageFilter {
- public:
- InternalMessageFilter(TestMetroViewerProcessHost* owner);
-
- // IPC::ChannelProxy::MessageFilter implementation.
- virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
-
- private:
- TestMetroViewerProcessHost* owner_;
- DISALLOW_COPY_AND_ASSIGN(InternalMessageFilter);
- };
-
- // Members related to the IPC channel. Note that the order is important
- // here as ipc_thread_ should be destroyed after channel_.
- base::Thread ipc_thread_;
- scoped_ptr<IPC::ChannelProxy> channel_;
- base::WaitableEvent channel_connected_event_;
+ // win8::MetroViewerProcessHost implementation
+ virtual void OnChannelError() OVERRIDE;
+ virtual void OnSetTargetSurface(gfx::NativeViewId target_surface) OVERRIDE;
scoped_ptr<AcceleratedSurface> backing_surface;
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/test/test_metro_viewer_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698