| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/widget/root_view.h" | 5 #include "views/widget/root_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/drag_drop_types.h" | 9 #include "app/drag_drop_types.h" |
| 10 #include "app/keyboard_codes.h" | 10 #include "app/keyboard_codes.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 if (touch_pressed_handler_) { | 289 if (touch_pressed_handler_) { |
| 290 touch_pressed_handler_ = NULL; | 290 touch_pressed_handler_ = NULL; |
| 291 } | 291 } |
| 292 #endif | 292 #endif |
| 293 | 293 |
| 294 FocusManager* focus_manager = widget_->GetFocusManager(); | 294 FocusManager* focus_manager = widget_->GetFocusManager(); |
| 295 // An unparanted RootView does not have a FocusManager. | 295 // An unparanted RootView does not have a FocusManager. |
| 296 if (focus_manager) | 296 if (focus_manager) |
| 297 focus_manager->ViewRemoved(parent, child); | 297 focus_manager->ViewRemoved(parent, child); |
| 298 | 298 |
| 299 ViewStorage::GetSharedInstance()->ViewRemoved(parent, child); | 299 ViewStorage::GetInstance()->ViewRemoved(parent, child); |
| 300 } | 300 } |
| 301 } | 301 } |
| 302 | 302 |
| 303 void RootView::SetFocusOnMousePressed(bool f) { | 303 void RootView::SetFocusOnMousePressed(bool f) { |
| 304 focus_on_mouse_pressed_ = f; | 304 focus_on_mouse_pressed_ = f; |
| 305 } | 305 } |
| 306 | 306 |
| 307 #if defined(TOUCH_UI) | 307 #if defined(TOUCH_UI) |
| 308 bool RootView::OnTouchEvent(const TouchEvent& e) { | 308 bool RootView::OnTouchEvent(const TouchEvent& e) { |
| 309 // If touch_pressed_handler_ is non null, we are currently processing | 309 // If touch_pressed_handler_ is non null, we are currently processing |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 #elif defined(OS_LINUX) | 782 #elif defined(OS_LINUX) |
| 783 gfx::NativeView native_view = | 783 gfx::NativeView native_view = |
| 784 static_cast<WidgetGtk*>(GetWidget())->window_contents(); | 784 static_cast<WidgetGtk*>(GetWidget())->window_contents(); |
| 785 if (!native_view) | 785 if (!native_view) |
| 786 return; | 786 return; |
| 787 gdk_window_set_cursor(native_view->window, cursor); | 787 gdk_window_set_cursor(native_view->window, cursor); |
| 788 #endif | 788 #endif |
| 789 } | 789 } |
| 790 | 790 |
| 791 } // namespace views | 791 } // namespace views |
| OLD | NEW |