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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 virtual FocusManager* GetFocusManager() OVERRIDE; | 276 virtual FocusManager* GetFocusManager() OVERRIDE; |
277 | 277 |
278 // Overridden from aura::client::CaptureDelegate: | 278 // Overridden from aura::client::CaptureDelegate: |
279 virtual void UpdateCapture(Window* old_capture, Window* new_capture) OVERRIDE; | 279 virtual void UpdateCapture(Window* old_capture, Window* new_capture) OVERRIDE; |
280 virtual void SetNativeCapture() OVERRIDE; | 280 virtual void SetNativeCapture() OVERRIDE; |
281 virtual void ReleaseNativeCapture() OVERRIDE; | 281 virtual void ReleaseNativeCapture() OVERRIDE; |
282 | 282 |
283 // Exposes RootWindowHost::QueryMouseLocation() for test purposes. | 283 // Exposes RootWindowHost::QueryMouseLocation() for test purposes. |
284 gfx::Point QueryMouseLocationForTest() const; | 284 gfx::Point QueryMouseLocationForTest() const; |
285 | 285 |
| 286 void set_parent_event_target(ui::EventTarget* parent_event_target) { |
| 287 parent_event_target_ = parent_event_target; |
| 288 } |
| 289 |
286 private: | 290 private: |
287 friend class Window; | 291 friend class Window; |
288 friend class CompositorLock; | 292 friend class CompositorLock; |
289 | 293 |
290 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, | 294 // Called whenever the mouse moves, tracks the current |mouse_moved_handler_|, |
291 // sending exited and entered events as its value changes. | 295 // sending exited and entered events as its value changes. |
292 void HandleMouseMoved(const ui::MouseEvent& event, Window* target); | 296 void HandleMouseMoved(const ui::MouseEvent& event, Window* target); |
293 | 297 |
294 bool ProcessMouseEvent(Window* target, ui::MouseEvent* event); | 298 bool ProcessMouseEvent(Window* target, ui::MouseEvent* event); |
295 bool ProcessKeyEvent(Window* target, ui::KeyEvent* event); | 299 bool ProcessKeyEvent(Window* target, ui::KeyEvent* event); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 scoped_ptr<ui::MouseEvent> held_mouse_move_; | 410 scoped_ptr<ui::MouseEvent> held_mouse_move_; |
407 // Used to schedule DispatchHeldMouseMove() when |mouse_move_hold_count_| goes | 411 // Used to schedule DispatchHeldMouseMove() when |mouse_move_hold_count_| goes |
408 // to 0. | 412 // to 0. |
409 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_; | 413 base::WeakPtrFactory<RootWindow> held_mouse_event_factory_; |
410 | 414 |
411 scoped_ptr<ui::ViewProp> prop_; | 415 scoped_ptr<ui::ViewProp> prop_; |
412 | 416 |
413 CompositorLock* compositor_lock_; | 417 CompositorLock* compositor_lock_; |
414 bool draw_on_compositor_unlock_; | 418 bool draw_on_compositor_unlock_; |
415 | 419 |
| 420 // Set to parent EventTarget if any. If this is set to NULL, we default to |
| 421 // EventTarget implemented by the Aura Environment. |
| 422 ui::EventTarget* parent_event_target_; |
| 423 |
416 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 424 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
417 }; | 425 }; |
418 | 426 |
419 } // namespace aura | 427 } // namespace aura |
420 | 428 |
421 #endif // UI_AURA_ROOT_WINDOW_H_ | 429 #endif // UI_AURA_ROOT_WINDOW_H_ |
OLD | NEW |