// Copyright (c) 2013 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. #include "ash/test/test_metro_viewer_process_host.h" #include #include "base/logging.h" #include "ui/aura/remote_root_window_host_win.h" #include "ui/surface/accelerated_surface_win.h" namespace ash { namespace test { TestMetroViewerProcessHost::TestMetroViewerProcessHost( base::SingleThreadTaskRunner* ipc_task_runner) : MetroViewerProcessHost(ipc_task_runner), closed_unexpectedly_(false) { } TestMetroViewerProcessHost::~TestMetroViewerProcessHost() { } void TestMetroViewerProcessHost::OnChannelError() { closed_unexpectedly_ = true; aura::RemoteRootWindowHostWin::Instance()->Disconnected(); } void TestMetroViewerProcessHost::OnSetTargetSurface( gfx::NativeViewId target_surface) { DLOG(INFO) << __FUNCTION__ << ", target_surface = " << target_surface; HWND hwnd = reinterpret_cast(target_surface); backing_surface_.reset(new AcceleratedSurface(hwnd)); scoped_refptr any_window = AcceleratedPresenter::GetForWindow(NULL); any_window->SetNewTargetWindow(hwnd); aura::RemoteRootWindowHostWin::Instance()->Connected(this); } void TestMetroViewerProcessHost::OnOpenURL(const string16& url) { } void TestMetroViewerProcessHost::OnHandleSearchRequest( const string16& search_string) { } } // namespace test } // namespace ash