OLD | NEW |
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 "mojo/examples/aura_demo/window_tree_host_mojo.h" | 5 #include "mojo/examples/aura_demo/window_tree_host_mojo.h" |
6 | 6 |
7 #include "mojo/examples/aura_demo/demo_context_factory.h" | 7 #include "mojo/examples/aura_demo/demo_context_factory.h" |
8 #include "mojo/public/c/gles2/gles2.h" | 8 #include "mojo/public/c/gles2/gles2.h" |
9 #include "mojo/public/cpp/bindings/allocation_scope.h" | 9 #include "mojo/public/cpp/bindings/allocation_scope.h" |
10 #include "mojo/services/native_viewport/geometry_conversions.h" | 10 #include "mojo/services/native_viewport/geometry_conversions.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void WindowTreeHostMojo::Show() { | 64 void WindowTreeHostMojo::Show() { |
65 window()->Show(); | 65 window()->Show(); |
66 native_viewport_->Show(); | 66 native_viewport_->Show(); |
67 } | 67 } |
68 | 68 |
69 void WindowTreeHostMojo::Hide() { | 69 void WindowTreeHostMojo::Hide() { |
70 native_viewport_->Hide(); | 70 native_viewport_->Hide(); |
71 window()->Hide(); | 71 window()->Hide(); |
72 } | 72 } |
73 | 73 |
74 void WindowTreeHostMojo::ToggleFullScreen() { | |
75 NOTIMPLEMENTED(); | |
76 } | |
77 | |
78 gfx::Rect WindowTreeHostMojo::GetBounds() const { | 74 gfx::Rect WindowTreeHostMojo::GetBounds() const { |
79 return bounds_; | 75 return bounds_; |
80 } | 76 } |
81 | 77 |
82 void WindowTreeHostMojo::SetBounds(const gfx::Rect& bounds) { | 78 void WindowTreeHostMojo::SetBounds(const gfx::Rect& bounds) { |
83 AllocationScope scope; | 79 AllocationScope scope; |
84 native_viewport_->SetBounds(bounds); | 80 native_viewport_->SetBounds(bounds); |
85 } | 81 } |
86 | 82 |
87 gfx::Insets WindowTreeHostMojo::GetInsets() const { | |
88 NOTIMPLEMENTED(); | |
89 return gfx::Insets(); | |
90 } | |
91 | |
92 void WindowTreeHostMojo::SetInsets(const gfx::Insets& insets) { | |
93 NOTIMPLEMENTED(); | |
94 } | |
95 | |
96 gfx::Point WindowTreeHostMojo::GetLocationOnNativeScreen() const { | 83 gfx::Point WindowTreeHostMojo::GetLocationOnNativeScreen() const { |
97 return gfx::Point(0, 0); | 84 return gfx::Point(0, 0); |
98 } | 85 } |
99 | 86 |
100 void WindowTreeHostMojo::SetCapture() { | 87 void WindowTreeHostMojo::SetCapture() { |
101 NOTIMPLEMENTED(); | 88 NOTIMPLEMENTED(); |
102 } | 89 } |
103 | 90 |
104 void WindowTreeHostMojo::ReleaseCapture() { | 91 void WindowTreeHostMojo::ReleaseCapture() { |
105 NOTIMPLEMENTED(); | 92 NOTIMPLEMENTED(); |
106 } | 93 } |
107 | 94 |
108 bool WindowTreeHostMojo::QueryMouseLocation(gfx::Point* location_return) { | 95 bool WindowTreeHostMojo::QueryMouseLocation(gfx::Point* location_return) { |
109 NOTIMPLEMENTED() << "QueryMouseLocation"; | 96 NOTIMPLEMENTED() << "QueryMouseLocation"; |
110 return false; | 97 return false; |
111 } | 98 } |
112 | 99 |
113 bool WindowTreeHostMojo::ConfineCursorToRootWindow() { | |
114 NOTIMPLEMENTED(); | |
115 return false; | |
116 } | |
117 | |
118 void WindowTreeHostMojo::UnConfineCursor() { | |
119 NOTIMPLEMENTED(); | |
120 } | |
121 | |
122 void WindowTreeHostMojo::PostNativeEvent( | 100 void WindowTreeHostMojo::PostNativeEvent( |
123 const base::NativeEvent& native_event) { | 101 const base::NativeEvent& native_event) { |
124 NOTIMPLEMENTED(); | 102 NOTIMPLEMENTED(); |
125 } | 103 } |
126 | 104 |
127 void WindowTreeHostMojo::OnDeviceScaleFactorChanged(float device_scale_factor) { | 105 void WindowTreeHostMojo::OnDeviceScaleFactorChanged(float device_scale_factor) { |
128 NOTIMPLEMENTED(); | 106 NOTIMPLEMENTED(); |
129 } | 107 } |
130 | 108 |
131 void WindowTreeHostMojo::SetCursorNative(gfx::NativeCursor cursor) { | 109 void WindowTreeHostMojo::SetCursorNative(gfx::NativeCursor cursor) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 SendEventToProcessor(&ev); | 168 SendEventToProcessor(&ev); |
191 break; | 169 break; |
192 } | 170 } |
193 // TODO(beng): touch, etc. | 171 // TODO(beng): touch, etc. |
194 } | 172 } |
195 callback.Run(); | 173 callback.Run(); |
196 }; | 174 }; |
197 | 175 |
198 } // namespace examples | 176 } // namespace examples |
199 } // namespace mojo | 177 } // namespace mojo |
OLD | NEW |