OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/window_tree_host_win.h" | 5 #include "ui/aura/window_tree_host_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 105 } |
106 | 106 |
107 void WindowTreeHostWin::MoveCursorToNative(const gfx::Point& location) { | 107 void WindowTreeHostWin::MoveCursorToNative(const gfx::Point& location) { |
108 // Deliberately not implemented. | 108 // Deliberately not implemented. |
109 } | 109 } |
110 | 110 |
111 void WindowTreeHostWin::OnCursorVisibilityChangedNative(bool show) { | 111 void WindowTreeHostWin::OnCursorVisibilityChangedNative(bool show) { |
112 NOTIMPLEMENTED(); | 112 NOTIMPLEMENTED(); |
113 } | 113 } |
114 | 114 |
115 void WindowTreeHostWin::PostNativeEvent(const base::NativeEvent& native_event) { | |
116 ::PostMessage( | |
117 widget_, native_event.message, native_event.wParam, native_event.lParam); | |
118 } | |
119 | |
120 ui::EventProcessor* WindowTreeHostWin::GetEventProcessor() { | 115 ui::EventProcessor* WindowTreeHostWin::GetEventProcessor() { |
121 return dispatcher(); | 116 return dispatcher(); |
122 } | 117 } |
123 | 118 |
124 void WindowTreeHostWin::OnBoundsChanged(const gfx::Rect& new_bounds) { | 119 void WindowTreeHostWin::OnBoundsChanged(const gfx::Rect& new_bounds) { |
125 gfx::Rect old_bounds = bounds_; | 120 gfx::Rect old_bounds = bounds_; |
126 bounds_ = new_bounds; | 121 bounds_ = new_bounds; |
127 if (bounds_.origin() != old_bounds.origin()) | 122 if (bounds_.origin() != old_bounds.origin()) |
128 OnHostMoved(bounds_.origin()); | 123 OnHostMoved(bounds_.origin()); |
129 if (bounds_.size() != old_bounds.size()) | 124 if (bounds_.size() != old_bounds.size()) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 widget_ = widget; | 159 widget_ = widget; |
165 CreateCompositor(widget); | 160 CreateCompositor(widget); |
166 } | 161 } |
167 | 162 |
168 void WindowTreeHostWin::OnActivationChanged(bool active) { | 163 void WindowTreeHostWin::OnActivationChanged(bool active) { |
169 if (active) | 164 if (active) |
170 OnHostActivated(); | 165 OnHostActivated(); |
171 } | 166 } |
172 | 167 |
173 } // namespace aura | 168 } // namespace aura |
OLD | NEW |