blob: a7c85047ffd7ffb67bd98d11bab6b13d96d0a1f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// 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 <shellapi.h>
#include <shlobj.h>
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/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 "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) {
}
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<HWND>(target_surface);
backing_surface.reset(new AcceleratedSurface(hwnd));
scoped_refptr<AcceleratedPresenter> 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
|