| 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 #include "ash/system/tray/tray_bubble_view.h" | 5 #include "ash/system/tray/tray_bubble_view.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 } | 469 } |
| 470 | 470 |
| 471 ui::TouchStatus TrayBubbleView::Host::PreHandleTouchEvent( | 471 ui::TouchStatus TrayBubbleView::Host::PreHandleTouchEvent( |
| 472 aura::Window* target, | 472 aura::Window* target, |
| 473 ui::TouchEvent* event) { | 473 ui::TouchEvent* event) { |
| 474 if (event->type() == ui::ET_TOUCH_PRESSED) | 474 if (event->type() == ui::ET_TOUCH_PRESSED) |
| 475 ProcessLocatedEvent(target, *event); | 475 ProcessLocatedEvent(target, *event); |
| 476 return ui::TOUCH_STATUS_UNKNOWN; | 476 return ui::TOUCH_STATUS_UNKNOWN; |
| 477 } | 477 } |
| 478 | 478 |
| 479 ui::GestureStatus TrayBubbleView::Host::PreHandleGestureEvent( | 479 ui::EventResult TrayBubbleView::Host::PreHandleGestureEvent( |
| 480 aura::Window* target, | 480 aura::Window* target, |
| 481 ui::GestureEvent* event) { | 481 ui::GestureEvent* event) { |
| 482 return ui::GESTURE_STATUS_UNKNOWN; | 482 return ui::ER_UNHANDLED; |
| 483 } | 483 } |
| 484 | 484 |
| 485 void TrayBubbleView::Host::ProcessLocatedEvent( | 485 void TrayBubbleView::Host::ProcessLocatedEvent( |
| 486 aura::Window* target, const ui::LocatedEvent& event) { | 486 aura::Window* target, const ui::LocatedEvent& event) { |
| 487 if (target) { | 487 if (target) { |
| 488 // Don't process events that occurred inside an embedded menu. | 488 // Don't process events that occurred inside an embedded menu. |
| 489 RootWindowController* root_controller = | 489 RootWindowController* root_controller = |
| 490 GetRootWindowController(target->GetRootWindow()); | 490 GetRootWindowController(target->GetRootWindow()); |
| 491 if (root_controller && root_controller->GetContainer( | 491 if (root_controller && root_controller->GetContainer( |
| 492 ash::internal::kShellWindowId_MenuContainer)->Contains(target)) { | 492 ash::internal::kShellWindowId_MenuContainer)->Contains(target)) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 506 return; | 506 return; |
| 507 } | 507 } |
| 508 // Handle clicking outside the bubble and tray. We don't block the event, so | 508 // Handle clicking outside the bubble and tray. We don't block the event, so |
| 509 // it will also be handled by whatever widget was clicked on. | 509 // it will also be handled by whatever widget was clicked on. |
| 510 OnClickedOutsideView(); | 510 OnClickedOutsideView(); |
| 511 } | 511 } |
| 512 | 512 |
| 513 | 513 |
| 514 } // namespace internal | 514 } // namespace internal |
| 515 } // namespace ash | 515 } // namespace ash |
| OLD | NEW |