| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 | 10 |
| 11 namespace aura { | 11 namespace aura { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 class FocusManager; | 14 class FocusManager; |
| 15 | 15 |
| 16 // A Window subclass that handles event targeting for certain types of | 16 // A Window subclass that handles event targeting for certain types of |
| 17 // MouseEvent. | 17 // MouseEvent. |
| 18 class RootWindow : public Window { | 18 class RootWindow : public Window { |
| 19 public: | 19 public: |
| 20 RootWindow(); | 20 RootWindow(); |
| 21 virtual ~RootWindow(); | 21 virtual ~RootWindow(); |
| 22 | 22 |
| 23 // Handles a mouse event. Returns true if handled. | 23 // Handles a mouse event. Returns true if handled. |
| 24 bool HandleMouseEvent(const MouseEvent& event); | 24 bool HandleMouseEvent(const MouseEvent& event); |
| 25 | 25 |
| 26 // Handles a key event. Returns true if handled. | 26 // Handles a key event. Returns true if handled. |
| 27 bool HandleKeyEvent(const KeyEvent& event); | 27 bool HandleKeyEvent(const KeyEvent& event); |
| 28 | 28 |
| 29 // Overridden from Window: | 29 // Overridden from Window: |
| 30 virtual bool IsTopLevelWindowContainer() const OVERRIDE; | |
| 31 virtual FocusManager* GetFocusManager() OVERRIDE; | 30 virtual FocusManager* GetFocusManager() OVERRIDE; |
| 32 | 31 |
| 33 private: | 32 private: |
| 34 Window* mouse_pressed_handler_; | 33 Window* mouse_pressed_handler_; |
| 35 scoped_ptr<FocusManager> focus_manager_; | 34 scoped_ptr<FocusManager> focus_manager_; |
| 36 | 35 |
| 37 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 36 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 } // namespace internal | 39 } // namespace internal |
| 41 } // namespace aura | 40 } // namespace aura |
| 42 | 41 |
| 43 #endif // UI_AURA_ROOT_WINDOW_H_ | 42 #endif // UI_AURA_ROOT_WINDOW_H_ |
| OLD | NEW |