| 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 #ifndef UI_AURA_ROOT_WINDOW_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_H_ |
| 6 #define UI_AURA_ROOT_WINDOW_H_ | 6 #define UI_AURA_ROOT_WINDOW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // event-dispatching function (e.g. for touch/mouse/keyboard events), gesture | 143 // event-dispatching function (e.g. for touch/mouse/keyboard events), gesture |
| 144 // events are dispatched from GestureRecognizer instead of RootWindowHost. | 144 // events are dispatched from GestureRecognizer instead of RootWindowHost. |
| 145 bool DispatchGestureEvent(GestureEvent* event); | 145 bool DispatchGestureEvent(GestureEvent* event); |
| 146 | 146 |
| 147 // Called when the host changes size. | 147 // Called when the host changes size. |
| 148 void OnHostResized(const gfx::Size& size); | 148 void OnHostResized(const gfx::Size& size); |
| 149 | 149 |
| 150 // Invoked when |window| is being destroyed. | 150 // Invoked when |window| is being destroyed. |
| 151 void OnWindowDestroying(Window* window); | 151 void OnWindowDestroying(Window* window); |
| 152 | 152 |
| 153 // Invokved when |window|'s bounds is changed. |contained_mouse| indicates if | 153 // Invoked when |window|'s bounds have changed. |contained_mouse| indicates if |
| 154 // the bounds before change contained the |last_moust_location()|. | 154 // the bounds before change contained the |last_moust_location()|. |
| 155 void OnWindowBoundsChanged(Window* window, bool contained_mouse); | 155 void OnWindowBoundsChanged(Window* window, bool contained_mouse); |
| 156 | 156 |
| 157 // Invokved when |window|'s visibility is changed. | 157 // Invoked when |window|'s visibility is changed. |
| 158 void OnWindowVisibilityChanged(Window* window, bool is_visible); | 158 void OnWindowVisibilityChanged(Window* window, bool is_visible); |
| 159 | 159 |
| 160 // Invokved when |window|'s tranfrom has changed. |contained_mouse| | 160 // Invoked when |window|'s tranfrom has changed. |contained_mouse| |
| 161 // indicates if the bounds before change contained the | 161 // indicates if the bounds before change contained the |
| 162 // |last_moust_location()|. | 162 // |last_moust_location()|. |
| 163 void OnWindowTransformed(Window* window, bool contained_mouse); | 163 void OnWindowTransformed(Window* window, bool contained_mouse); |
| 164 | 164 |
| 165 // Invoked when the keyboard mapping (in X11 terms: the mapping between |
| 166 // keycodes and keysyms) has changed. |
| 167 void OnKeyboardMappingChanged(); |
| 168 |
| 165 // Add/remove observer. There is no need to remove the observer if | 169 // Add/remove observer. There is no need to remove the observer if |
| 166 // the root window is being deleted. In particular, you SHOULD NOT remove | 170 // the root window is being deleted. In particular, you SHOULD NOT remove |
| 167 // in |WindowObserver::OnWindowDestroying| of the observer observing | 171 // in |WindowObserver::OnWindowDestroying| of the observer observing |
| 168 // the root window because it is too late to remove it. | 172 // the root window because it is too late to remove it. |
| 169 void AddRootWindowObserver(RootWindowObserver* observer); | 173 void AddRootWindowObserver(RootWindowObserver* observer); |
| 170 void RemoveRootWindowObserver(RootWindowObserver* observer); | 174 void RemoveRootWindowObserver(RootWindowObserver* observer); |
| 171 | 175 |
| 172 // Posts |native_event| to the platform's event queue. | 176 // Posts |native_event| to the platform's event queue. |
| 173 void PostNativeEvent(const base::NativeEvent& native_event); | 177 void PostNativeEvent(const base::NativeEvent& native_event); |
| 174 | 178 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 bool draw_on_compositor_unlock_; | 368 bool draw_on_compositor_unlock_; |
| 365 | 369 |
| 366 int draw_trace_count_; | 370 int draw_trace_count_; |
| 367 | 371 |
| 368 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 372 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
| 369 }; | 373 }; |
| 370 | 374 |
| 371 } // namespace aura | 375 } // namespace aura |
| 372 | 376 |
| 373 #endif // UI_AURA_ROOT_WINDOW_H_ | 377 #endif // UI_AURA_ROOT_WINDOW_H_ |
| OLD | NEW |