| 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 #include "ui/views/widget/root_view.h" | 5 #include "ui/views/widget/root_view.h" |
| 6 | 6 |
| 7 #include "ui/views/focus/focus_manager.h" | 7 #include "ui/views/focus/focus_manager.h" |
| 8 #include "ui/views/layout/fill_layout.h" | 8 #include "ui/views/layout/fill_layout.h" |
| 9 #include "ui/views/widget/widget.h" | 9 #include "ui/views/widget/widget.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 SetLayoutManager(new FillLayout); | 24 SetLayoutManager(new FillLayout); |
| 25 AddChildView(contents_view); | 25 AddChildView(contents_view); |
| 26 } | 26 } |
| 27 | 27 |
| 28 RootView::~RootView() { | 28 RootView::~RootView() { |
| 29 } | 29 } |
| 30 | 30 |
| 31 //////////////////////////////////////////////////////////////////////////////// | 31 //////////////////////////////////////////////////////////////////////////////// |
| 32 // RootView, View overrides: | 32 // RootView, View overrides: |
| 33 | 33 |
| 34 void RootView::OnViewRemoved(View* parent, View* child) { | 34 void RootView::OnViewRemoved(const View& parent, const View& child) { |
| 35 if (child == mouse_pressed_handler_) | 35 if (&child == mouse_pressed_handler_) |
| 36 mouse_pressed_handler_ = NULL; | 36 mouse_pressed_handler_ = NULL; |
| 37 | 37 |
| 38 GetFocusManager()->RemoveView(child); | 38 GetFocusManager()->RemoveView(&child); |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool RootView::OnKeyPressed(const KeyEvent& event) { | 41 bool RootView::OnKeyPressed(const KeyEvent& event) { |
| 42 return true; | 42 return true; |
| 43 } | 43 } |
| 44 | 44 |
| 45 bool RootView::OnKeyReleased(const KeyEvent& event) { | 45 bool RootView::OnKeyReleased(const KeyEvent& event) { |
| 46 return true; | 46 return true; |
| 47 } | 47 } |
| 48 | 48 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 View* RootView::GetFocusTraversableParentView() const { | 158 View* RootView::GetFocusTraversableParentView() const { |
| 159 return focus_traversable_parent_view_; | 159 return focus_traversable_parent_view_; |
| 160 } | 160 } |
| 161 | 161 |
| 162 | 162 |
| 163 //////////////////////////////////////////////////////////////////////////////// | 163 //////////////////////////////////////////////////////////////////////////////// |
| 164 // RootView, private: | 164 // RootView, private: |
| 165 | 165 |
| 166 } // namespace internal | 166 } // namespace internal |
| 167 } // namespace ui | 167 } // namespace ui |
| OLD | NEW |