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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // factor. The RootWindowHostDelegate dispatches events in the physical pixel | 273 // factor. The RootWindowHostDelegate dispatches events in the physical pixel |
274 // coordinate. But the event processing from RootWindow onwards happen in | 274 // coordinate. But the event processing from RootWindow onwards happen in |
275 // device-independent pixel coordinate. So it is necessary to update the event | 275 // device-independent pixel coordinate. So it is necessary to update the event |
276 // received from the host. | 276 // received from the host. |
277 void TransformEventForDeviceScaleFactor(ui::LocatedEvent* event); | 277 void TransformEventForDeviceScaleFactor(ui::LocatedEvent* event); |
278 | 278 |
279 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, | 279 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, |
280 // sending exited and entered events as its value changes. | 280 // sending exited and entered events as its value changes. |
281 void HandleMouseMoved(const ui::MouseEvent& event, Window* target); | 281 void HandleMouseMoved(const ui::MouseEvent& event, Window* target); |
282 | 282 |
283 bool ProcessMouseEvent(Window* target, ui::MouseEvent* event); | 283 void ProcessMouseEvent(Window* target, ui::MouseEvent* event); |
284 bool ProcessKeyEvent(Window* target, ui::KeyEvent* event); | 284 void ProcessKeyEvent(Window* target, ui::KeyEvent* event); |
285 bool ProcessScrollEvent(Window* target, ui::ScrollEvent* event); | 285 void ProcessScrollEvent(Window* target, ui::ScrollEvent* event); |
286 ui::EventResult ProcessTouchEvent(Window* target, ui::TouchEvent* event); | 286 void ProcessTouchEvent(Window* target, ui::TouchEvent* event); |
287 ui::EventResult ProcessGestureEvent(Window* target, | 287 void ProcessGestureEvent(Window* target, ui::GestureEvent* event); |
288 ui::GestureEvent* event); | |
289 bool ProcessGestures(ui::GestureRecognizer::Gestures* gestures); | 288 bool ProcessGestures(ui::GestureRecognizer::Gestures* gestures); |
290 | 289 |
291 // Called when a Window is attached or detached from the RootWindow. | 290 // Called when a Window is attached or detached from the RootWindow. |
292 void OnWindowAddedToRootWindow(Window* window); | 291 void OnWindowAddedToRootWindow(Window* window); |
293 void OnWindowRemovedFromRootWindow(Window* window, RootWindow* new_root); | 292 void OnWindowRemovedFromRootWindow(Window* window, RootWindow* new_root); |
294 | 293 |
295 // Called when a window becomes invisible, either by being removed | 294 // Called when a window becomes invisible, either by being removed |
296 // from root window hierachy, via SetVisible(false) or being destroyed. | 295 // from root window hierachy, via SetVisible(false) or being destroyed. |
297 // |reason| specifies what triggered the hiding. |new_root| is the new root | 296 // |reason| specifies what triggered the hiding. |new_root| is the new root |
298 // window, and may be NULL. | 297 // window, and may be NULL. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_; | 398 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_; |
400 | 399 |
401 scoped_ptr<ui::ViewProp> prop_; | 400 scoped_ptr<ui::ViewProp> prop_; |
402 | 401 |
403 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 402 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
404 }; | 403 }; |
405 | 404 |
406 } // namespace aura | 405 } // namespace aura |
407 | 406 |
408 #endif // UI_AURA_ROOT_WINDOW_H_ | 407 #endif // UI_AURA_ROOT_WINDOW_H_ |
OLD | NEW |