OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "headless/lib/browser/headless_window_tree_host.h" | |
6 | |
7 #include "ui/gfx/icc_profile.h" | |
8 | |
9 namespace headless { | |
10 | |
11 HeadlessWindowTreeHost::HeadlessWindowTreeHost(const gfx::Rect& bounds) | |
12 : bounds_(bounds) { | |
13 CreateCompositor(); | |
14 OnAcceleratedWidgetAvailable(); | |
15 } | |
16 | |
17 HeadlessWindowTreeHost::~HeadlessWindowTreeHost() { | |
18 DestroyCompositor(); | |
19 DestroyDispatcher(); | |
20 } | |
21 | |
22 bool HeadlessWindowTreeHost::CanDispatchEvent(const ui::PlatformEvent& event) { | |
23 return false; | |
24 } | |
25 | |
26 uint32_t HeadlessWindowTreeHost::DispatchEvent(const ui::PlatformEvent& event) { | |
27 return 0; | |
28 } | |
29 | |
30 ui::EventSource* HeadlessWindowTreeHost::GetEventSource() { | |
31 return this; | |
32 } | |
33 | |
34 gfx::AcceleratedWidget HeadlessWindowTreeHost::GetAcceleratedWidget() { | |
35 return gfx::AcceleratedWidget(); | |
36 } | |
37 | |
38 gfx::Rect HeadlessWindowTreeHost::GetBounds() const { | |
39 return bounds_; | |
40 } | |
41 | |
42 void HeadlessWindowTreeHost::SetBounds(const gfx::Rect& bounds) { | |
43 bounds_ = bounds; | |
Eric Seckler
2016/11/28 15:51:48
You might want to call OnHostMoved() / OnHostResiz
Sami
2016/11/28 18:00:36
Thanks, done!
| |
44 } | |
45 | |
46 void HeadlessWindowTreeHost::ShowImpl() {} | |
47 | |
48 void HeadlessWindowTreeHost::HideImpl() {} | |
49 | |
50 gfx::Point HeadlessWindowTreeHost::GetLocationOnNativeScreen() const { | |
51 return gfx::Point(); | |
52 } | |
53 | |
54 void HeadlessWindowTreeHost::SetCapture() {} | |
55 | |
56 void HeadlessWindowTreeHost::ReleaseCapture() {} | |
57 | |
58 void HeadlessWindowTreeHost::SetCursorNative(gfx::NativeCursor cursor_type) {} | |
59 | |
60 void HeadlessWindowTreeHost::MoveCursorToNative(const gfx::Point& location) {} | |
61 | |
62 void HeadlessWindowTreeHost::OnCursorVisibilityChangedNative(bool show) {} | |
63 | |
64 gfx::ICCProfile HeadlessWindowTreeHost::GetICCProfileForCurrentDisplay() { | |
65 return gfx::ICCProfile(); | |
66 } | |
67 | |
68 } // namespace headless | |
OLD | NEW |