| 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_VIEWS_WIDGET_ROOT_VIEW_H_ | 5 #ifndef UI_VIEWS_WIDGET_ROOT_VIEW_H_ |
| 6 #define UI_VIEWS_WIDGET_ROOT_VIEW_H_ | 6 #define UI_VIEWS_WIDGET_ROOT_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/views/focus/focus_manager.h" | 9 #include "ui/views/focus/focus_manager.h" |
| 10 #include "ui/views/focus/focus_search.h" | 10 #include "ui/views/focus/focus_search.h" |
| 11 #include "ui/views/view.h" | 11 #include "ui/views/view.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace ui { |
| 14 namespace internal { | 14 namespace internal { |
| 15 | 15 |
| 16 //////////////////////////////////////////////////////////////////////////////// | 16 //////////////////////////////////////////////////////////////////////////////// |
| 17 // RootView class | 17 // RootView class |
| 18 // | 18 // |
| 19 // A View subclass that owns a View hierarchy. Used by the Widget to perform | 19 // A View subclass that owns a View hierarchy. Used by the Widget to perform |
| 20 // View-specific event tracking. | 20 // View-specific event tracking. |
| 21 // | 21 // |
| 22 class RootView : public View, | 22 class RootView : public View, |
| 23 public FocusTraversable { | 23 public FocusTraversable { |
| 24 public: | 24 public: |
| 25 RootView(Widget* widget, View* contents_view); | 25 RootView(Widget* widget, View* contents_view); |
| 26 virtual ~RootView(); | 26 virtual ~RootView(); |
| 27 | 27 |
| 28 // Overridden from View: | 28 // Overridden from View: |
| 29 virtual void OnViewRemoved(View* parent, View* child) OVERRIDE; | 29 virtual void OnViewRemoved(const View& parent, const View& child) OVERRIDE; |
| 30 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; | 30 virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE; |
| 31 virtual bool OnKeyReleased(const KeyEvent& event) OVERRIDE; | 31 virtual bool OnKeyReleased(const KeyEvent& event) OVERRIDE; |
| 32 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; | 32 virtual bool OnMouseWheel(const MouseWheelEvent& event) OVERRIDE; |
| 33 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; | 33 virtual bool OnMousePressed(const MouseEvent& event) OVERRIDE; |
| 34 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; | 34 virtual bool OnMouseDragged(const MouseEvent& event) OVERRIDE; |
| 35 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; | 35 virtual void OnMouseReleased(const MouseEvent& event) OVERRIDE; |
| 36 virtual void OnMouseCaptureLost() OVERRIDE; | 36 virtual void OnMouseCaptureLost() OVERRIDE; |
| 37 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; | 37 virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE; |
| 38 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; | 38 virtual void OnMouseExited(const MouseEvent& event) OVERRIDE; |
| 39 virtual void Paint(gfx::Canvas* canvas) OVERRIDE; | 39 virtual void Paint(gfx::Canvas* canvas) OVERRIDE; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 67 FocusTraversable* focus_traversable_parent_; | 67 FocusTraversable* focus_traversable_parent_; |
| 68 View* focus_traversable_parent_view_; | 68 View* focus_traversable_parent_view_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(RootView); | 70 DISALLOW_COPY_AND_ASSIGN(RootView); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace internal | 73 } // namespace internal |
| 74 } // namespace ui | 74 } // namespace ui |
| 75 | 75 |
| 76 #endif // UI_VIEWS_WIDGET_ROOT_VIEW_H_ | 76 #endif // UI_VIEWS_WIDGET_ROOT_VIEW_H_ |
| OLD | NEW |