| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 // resizes when HoldMouseMoves() is called. The following methods are used to | 374 // resizes when HoldMouseMoves() is called. The following methods are used to |
| 375 // dispatch held and newly incoming mouse and touch events, typically when an | 375 // dispatch held and newly incoming mouse and touch events, typically when an |
| 376 // event other than one of these needs dispatching or a matching | 376 // event other than one of these needs dispatching or a matching |
| 377 // ReleaseMouseMoves()/ReleaseTouchMoves() is called. NOTE: because these | 377 // ReleaseMouseMoves()/ReleaseTouchMoves() is called. NOTE: because these |
| 378 // methods dispatch events from RootWindowHost the coordinates are in terms of | 378 // methods dispatch events from RootWindowHost the coordinates are in terms of |
| 379 // the root. | 379 // the root. |
| 380 bool DispatchMouseEventImpl(ui::MouseEvent* event); | 380 bool DispatchMouseEventImpl(ui::MouseEvent* event); |
| 381 bool DispatchMouseEventRepost(ui::MouseEvent* event); | 381 bool DispatchMouseEventRepost(ui::MouseEvent* event); |
| 382 bool DispatchMouseEventToTarget(ui::MouseEvent* event, Window* target); | 382 bool DispatchMouseEventToTarget(ui::MouseEvent* event, Window* target); |
| 383 bool DispatchTouchEventImpl(ui::TouchEvent* event); | 383 bool DispatchTouchEventImpl(ui::TouchEvent* event); |
| 384 // Reposts the gesture event to the Window which is a target for the event |
| 385 // passed in. |
| 386 bool DispatchGestureEventRepost(ui::GestureEvent* event); |
| 384 void DispatchHeldEvents(); | 387 void DispatchHeldEvents(); |
| 385 | 388 |
| 386 // Parses the switch describing the initial size for the host window and | 389 // Parses the switch describing the initial size for the host window and |
| 387 // returns bounds for the window. | 390 // returns bounds for the window. |
| 388 gfx::Rect GetInitialHostWindowBounds() const; | 391 gfx::Rect GetInitialHostWindowBounds() const; |
| 389 | 392 |
| 390 // Posts a task to send synthesized mouse move event if there | 393 // Posts a task to send synthesized mouse move event if there |
| 391 // is no a pending task. | 394 // is no a pending task. |
| 392 void PostMouseMoveEventAfterWindowChange(); | 395 void PostMouseMoveEventAfterWindowChange(); |
| 393 | 396 |
| 394 // Creates and dispatches synthesized mouse move event using the | 397 // Creates and dispatches synthesized mouse move event using the |
| 395 // current mouse location. | 398 // current mouse location. |
| 396 void SynthesizeMouseMoveEvent(); | 399 void SynthesizeMouseMoveEvent(); |
| 397 | 400 |
| 398 gfx::Transform GetInverseRootTransform() const; | 401 gfx::Transform GetInverseRootTransform() const; |
| 399 | 402 |
| 400 // Reposts the gesture event to the Window which is a target for the event | |
| 401 // passed in. | |
| 402 bool DispatchGestureEventRepost(ui::GestureEvent* event); | |
| 403 | |
| 404 scoped_ptr<ui::Compositor> compositor_; | 403 scoped_ptr<ui::Compositor> compositor_; |
| 405 | 404 |
| 406 scoped_ptr<RootWindowHost> host_; | 405 scoped_ptr<RootWindowHost> host_; |
| 407 | 406 |
| 408 // Used to schedule painting. | 407 // Used to schedule painting. |
| 409 base::WeakPtrFactory<RootWindow> schedule_paint_factory_; | 408 base::WeakPtrFactory<RootWindow> schedule_paint_factory_; |
| 410 | 409 |
| 411 // Use to post mouse move event. | 410 // Use to post mouse move event. |
| 412 base::WeakPtrFactory<RootWindow> event_factory_; | 411 base::WeakPtrFactory<RootWindow> event_factory_; |
| 413 | 412 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 scoped_ptr<ui::ViewProp> prop_; | 446 scoped_ptr<ui::ViewProp> prop_; |
| 448 | 447 |
| 449 scoped_ptr<RootWindowTransformer> transformer_; | 448 scoped_ptr<RootWindowTransformer> transformer_; |
| 450 | 449 |
| 451 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 450 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
| 452 }; | 451 }; |
| 453 | 452 |
| 454 } // namespace aura | 453 } // namespace aura |
| 455 | 454 |
| 456 #endif // UI_AURA_ROOT_WINDOW_H_ | 455 #endif // UI_AURA_ROOT_WINDOW_H_ |
| OLD | NEW |