OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 "mojo/examples/aura_demo/window_tree_host_view_manager.h" | |
6 | |
7 #include "ui/aura/window.h" | |
8 #include "ui/aura/window_event_dispatcher.h" | |
9 #include "ui/events/event.h" | |
10 #include "ui/events/event_constants.h" | |
11 | |
12 namespace mojo { | |
13 namespace examples { | |
14 | |
15 //////////////////////////////////////////////////////////////////////////////// | |
16 // WindowTreeHostViewManager, public: | |
17 | |
18 WindowTreeHostViewManager::WindowTreeHostViewManager(const gfx::Rect& bounds) | |
19 : bounds_(bounds) { | |
20 CreateCompositor(GetAcceleratedWidget()); | |
21 } | |
22 | |
23 WindowTreeHostViewManager::~WindowTreeHostViewManager() { | |
24 DestroyCompositor(); | |
25 DestroyDispatcher(); | |
26 } | |
27 | |
28 //////////////////////////////////////////////////////////////////////////////// | |
29 // WindowTreeHostViewManager, aura::WindowTreeHost implementation: | |
30 | |
31 ui::EventSource* WindowTreeHostViewManager::GetEventSource() { | |
32 return this; | |
33 } | |
34 | |
35 gfx::AcceleratedWidget WindowTreeHostViewManager::GetAcceleratedWidget() { | |
36 NOTIMPLEMENTED() << "GetAcceleratedWidget"; | |
37 return gfx::kNullAcceleratedWidget; | |
38 } | |
39 | |
40 void WindowTreeHostViewManager::Show() { | |
41 window()->Show(); | |
42 } | |
43 | |
44 void WindowTreeHostViewManager::Hide() { | |
45 } | |
46 | |
47 gfx::Rect WindowTreeHostViewManager::GetBounds() const { | |
48 return bounds_; | |
49 } | |
50 | |
51 void WindowTreeHostViewManager::SetBounds(const gfx::Rect& bounds) { | |
52 } | |
53 | |
54 gfx::Point WindowTreeHostViewManager::GetLocationOnNativeScreen() const { | |
55 return gfx::Point(0, 0); | |
56 } | |
57 | |
58 void WindowTreeHostViewManager::SetCapture() { | |
59 NOTIMPLEMENTED(); | |
60 } | |
61 | |
62 void WindowTreeHostViewManager::ReleaseCapture() { | |
63 NOTIMPLEMENTED(); | |
64 } | |
65 | |
66 void WindowTreeHostViewManager::PostNativeEvent( | |
67 const base::NativeEvent& native_event) { | |
68 NOTIMPLEMENTED(); | |
69 } | |
70 | |
71 void WindowTreeHostViewManager::OnDeviceScaleFactorChanged( | |
72 float device_scale_factor) { | |
73 NOTIMPLEMENTED(); | |
74 } | |
75 | |
76 void WindowTreeHostViewManager::SetCursorNative(gfx::NativeCursor cursor) { | |
77 NOTIMPLEMENTED(); | |
78 } | |
79 | |
80 void WindowTreeHostViewManager::MoveCursorToNative(const gfx::Point& location) { | |
81 NOTIMPLEMENTED(); | |
82 } | |
83 | |
84 void WindowTreeHostViewManager::OnCursorVisibilityChangedNative(bool show) { | |
85 NOTIMPLEMENTED(); | |
86 } | |
87 | |
88 //////////////////////////////////////////////////////////////////////////////// | |
89 // WindowTreeHostViewManager, ui::EventSource implementation: | |
90 | |
91 ui::EventProcessor* WindowTreeHostViewManager::GetEventProcessor() { | |
92 return dispatcher(); | |
93 } | |
94 | |
95 } // namespace examples | |
96 } // namespace mojo | |
OLD | NEW |