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

Side by Side Diff: ash/test/test_metro_viewer_process_host.cc

Issue 15731003: Make the browser->metro_viewer IPC channel name a constant instead of hardcoding it in a few places… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix explicits Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 4
5 #include "ash/test/test_metro_viewer_process_host.h" 5 #include "ash/test/test_metro_viewer_process_host.h"
6 6
7 #include <shellapi.h> 7 #include <windef.h>
8 #include <shlobj.h>
9 8
10 #include "base/command_line.h" 9 #include "base/logging.h"
11 #include "base/file_util.h"
12 #include "base/files/file_path.h"
13 #include "base/strings/string16.h"
14 #include "base/time.h"
15 #include "base/win/scoped_com_initializer.h"
16 #include "base/win/scoped_comptr.h"
17 #include "ipc/ipc_channel_proxy.h"
18 #include "ipc/ipc_message_macros.h"
19 #include "ui/aura/remote_root_window_host_win.h" 10 #include "ui/aura/remote_root_window_host_win.h"
20 #include "ui/metro_viewer/metro_viewer_messages.h"
21 #include "ui/surface/accelerated_surface_win.h" 11 #include "ui/surface/accelerated_surface_win.h"
22 12
23 namespace ash { 13 namespace ash {
24 namespace test { 14 namespace test {
25 15
26 TestMetroViewerProcessHost::TestMetroViewerProcessHost( 16 TestMetroViewerProcessHost::TestMetroViewerProcessHost(
27 const std::string& ipc_channel_name,
28 base::SingleThreadTaskRunner* ipc_task_runner) 17 base::SingleThreadTaskRunner* ipc_task_runner)
29 : MetroViewerProcessHost(ipc_channel_name, ipc_task_runner), 18 : MetroViewerProcessHost(ipc_task_runner), closed_unexpectedly_(false) {
30 closed_unexpectedly_(false) {
31 } 19 }
32 20
33 TestMetroViewerProcessHost::~TestMetroViewerProcessHost() { 21 TestMetroViewerProcessHost::~TestMetroViewerProcessHost() {
34 } 22 }
35 23
36 void TestMetroViewerProcessHost::OnChannelError() { 24 void TestMetroViewerProcessHost::OnChannelError() {
37 closed_unexpectedly_ = true; 25 closed_unexpectedly_ = true;
38 aura::RemoteRootWindowHostWin::Instance()->Disconnected(); 26 aura::RemoteRootWindowHostWin::Instance()->Disconnected();
39 } 27 }
40 28
41 void TestMetroViewerProcessHost::OnSetTargetSurface( 29 void TestMetroViewerProcessHost::OnSetTargetSurface(
42 gfx::NativeViewId target_surface) { 30 gfx::NativeViewId target_surface) {
43 DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface; 31 DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface;
44 HWND hwnd = reinterpret_cast<HWND>(target_surface); 32 HWND hwnd = reinterpret_cast<HWND>(target_surface);
45 33
46 backing_surface.reset(new AcceleratedSurface(hwnd)); 34 backing_surface_.reset(new AcceleratedSurface(hwnd));
47 35
48 scoped_refptr<AcceleratedPresenter> any_window = 36 scoped_refptr<AcceleratedPresenter> any_window =
49 AcceleratedPresenter::GetForWindow(NULL); 37 AcceleratedPresenter::GetForWindow(NULL);
50 any_window->SetNewTargetWindow(hwnd); 38 any_window->SetNewTargetWindow(hwnd);
51 aura::RemoteRootWindowHostWin::Instance()->Connected(this); 39 aura::RemoteRootWindowHostWin::Instance()->Connected(this);
52 } 40 }
53 41
54 void TestMetroViewerProcessHost::OnOpenURL(const string16& url) { 42 void TestMetroViewerProcessHost::OnOpenURL(const string16& url) {
55 } 43 }
56 44
57 void TestMetroViewerProcessHost::OnHandleSearchRequest( 45 void TestMetroViewerProcessHost::OnHandleSearchRequest(
58 const string16& search_string) { 46 const string16& search_string) {
59 } 47 }
60 48
61 } // namespace test 49 } // namespace test
62 } // namespace ash 50 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_metro_viewer_process_host.h ('k') | chrome/browser/browser_process_platform_part_aurawin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698