diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 07:49:58 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 07:49:58 +0000 |
commit | 8c2f290e2e178336ab89a01d94ebba774152a6f5 (patch) | |
tree | 802bf45a7853f72013d55fb1578d099240c4132b /ash/test | |
parent | ae30caa256bbcf0b80af9f41d803320874c2ac0f (diff) | |
download | chromium_src-8c2f290e2e178336ab89a01d94ebba774152a6f5.zip chromium_src-8c2f290e2e178336ab89a01d94ebba774152a6f5.tar.gz chromium_src-8c2f290e2e178336ab89a01d94ebba774152a6f5.tar.bz2 |
Make the browser<-->metro_viewer IPC channel name a constant instead of hardcoding it in a few places and passing it via a flag.
Supporting a more generic use case via flags was making things more complicated for no apparent reason (other than perhaps one day supporting a random-channel-id -- I removed that TODO in this CL). This simplification will make it easier to introduce some sort of --viewer-launch-via-appid-and-connect flag for https://codereview.chromium.org/16022003/
BUG=179830
TEST=Can still launch Ash in Metro.
Review URL: https://chromiumcodereview.appspot.com/15731003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207750 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r-- | ash/test/ash_test_base.cc | 3 | ||||
-rw-r--r-- | ash/test/test_metro_viewer_process_host.cc | 22 | ||||
-rw-r--r-- | ash/test/test_metro_viewer_process_host.h | 8 |
3 files changed, 9 insertions, 24 deletions
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc index 8e93f27..7c03586 100644 --- a/ash/test/ash_test_base.cc +++ b/ash/test/ash_test_base.cc @@ -124,8 +124,7 @@ void AshTestBase::SetUp() { ipc_thread_->StartWithOptions(options); metro_viewer_host_.reset( - new TestMetroViewerProcessHost("viewer", - ipc_thread_->message_loop_proxy())); + new TestMetroViewerProcessHost(ipc_thread_->message_loop_proxy())); CHECK(metro_viewer_host_->LaunchViewerAndWaitForConnection( win8::test::kDefaultTestAppUserModelId)); aura::RemoteRootWindowHostWin* root_window_host = diff --git a/ash/test/test_metro_viewer_process_host.cc b/ash/test/test_metro_viewer_process_host.cc index 3819d35..a788da9 100644 --- a/ash/test/test_metro_viewer_process_host.cc +++ b/ash/test/test_metro_viewer_process_host.cc @@ -4,30 +4,18 @@ #include "ash/test/test_metro_viewer_process_host.h" -#include <shellapi.h> -#include <shlobj.h> - -#include "base/command_line.h" -#include "base/file_util.h" -#include "base/files/file_path.h" -#include "base/strings/string16.h" -#include "base/time.h" -#include "base/win/scoped_com_initializer.h" -#include "base/win/scoped_comptr.h" -#include "ipc/ipc_channel_proxy.h" -#include "ipc/ipc_message_macros.h" +#include <windef.h> + +#include "base/logging.h" #include "ui/aura/remote_root_window_host_win.h" -#include "ui/metro_viewer/metro_viewer_messages.h" #include "ui/surface/accelerated_surface_win.h" namespace ash { namespace test { TestMetroViewerProcessHost::TestMetroViewerProcessHost( - const std::string& ipc_channel_name, base::SingleThreadTaskRunner* ipc_task_runner) - : MetroViewerProcessHost(ipc_channel_name, ipc_task_runner), - closed_unexpectedly_(false) { + : MetroViewerProcessHost(ipc_task_runner), closed_unexpectedly_(false) { } TestMetroViewerProcessHost::~TestMetroViewerProcessHost() { @@ -43,7 +31,7 @@ void TestMetroViewerProcessHost::OnSetTargetSurface( DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface; HWND hwnd = reinterpret_cast<HWND>(target_surface); - backing_surface.reset(new AcceleratedSurface(hwnd)); + backing_surface_.reset(new AcceleratedSurface(hwnd)); scoped_refptr<AcceleratedPresenter> any_window = AcceleratedPresenter::GetForWindow(NULL); diff --git a/ash/test/test_metro_viewer_process_host.h b/ash/test/test_metro_viewer_process_host.h index 63ca815..e6d0a64 100644 --- a/ash/test/test_metro_viewer_process_host.h +++ b/ash/test/test_metro_viewer_process_host.h @@ -5,8 +5,7 @@ #ifndef ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ #define ASH_TEST_TEST_METRO_VIEWER_PROCESS_HOST_H_ -#include <string> - +#include "base/memory/scoped_ptr.h" #include "win8/viewer/metro_viewer_process_host.h" class AcceleratedSurface; @@ -16,8 +15,7 @@ namespace test { class TestMetroViewerProcessHost : public win8::MetroViewerProcessHost { public: - TestMetroViewerProcessHost(const std::string& ipc_channel_name, - base::SingleThreadTaskRunner* ipc_task_runner); + TestMetroViewerProcessHost(base::SingleThreadTaskRunner* ipc_task_runner); virtual ~TestMetroViewerProcessHost(); bool closed_unexpectedly() { return closed_unexpectedly_; } @@ -29,7 +27,7 @@ class TestMetroViewerProcessHost : public win8::MetroViewerProcessHost { virtual void OnOpenURL(const string16& url) OVERRIDE; virtual void OnHandleSearchRequest(const string16& search_string) OVERRIDE; - scoped_ptr<AcceleratedSurface> backing_surface; + scoped_ptr<AcceleratedSurface> backing_surface_; bool closed_unexpectedly_; |