| 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/common/system/tray/system_tray.h" | 5 #include "ash/common/system/tray/system_tray.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 } | 831 } |
| 832 | 832 |
| 833 void SystemTray::ActivateAndStartNavigation(const ui::KeyEvent& key_event) { | 833 void SystemTray::ActivateAndStartNavigation(const ui::KeyEvent& key_event) { |
| 834 if (!system_bubble_) | 834 if (!system_bubble_) |
| 835 return; | 835 return; |
| 836 activating_ = true; | 836 activating_ = true; |
| 837 ActivateBubble(); | 837 ActivateBubble(); |
| 838 activating_ = false; | 838 activating_ = false; |
| 839 // TODO(oshima): This is to troubleshoot the issue crbug.com/651242. Remove | 839 // TODO(oshima): This is to troubleshoot the issue crbug.com/651242. Remove |
| 840 // once the root cause is fixed. | 840 // once the root cause is fixed. |
| 841 CHECK(system_bubble_) << " the bubble was deleted while activaing it"; | 841 // the bubble was deleted while activaing it |
| 842 CHECK(system_bubble_); |
| 842 | 843 |
| 843 views::Widget* widget = GetSystemBubble()->bubble_view()->GetWidget(); | 844 views::Widget* widget = GetSystemBubble()->bubble_view()->GetWidget(); |
| 844 widget->GetFocusManager()->OnKeyEvent(key_event); | 845 widget->GetFocusManager()->OnKeyEvent(key_event); |
| 845 } | 846 } |
| 846 | 847 |
| 847 void SystemTray::CreateKeyEventWatcher() { | 848 void SystemTray::CreateKeyEventWatcher() { |
| 848 key_event_watcher_ = WmShell::Get()->CreateKeyEventWatcher(); | 849 key_event_watcher_ = WmShell::Get()->CreateKeyEventWatcher(); |
| 849 // mustash does not yet support KeyEventWatcher. http://crbug.com/649600. | 850 // mustash does not yet support KeyEventWatcher. http://crbug.com/649600. |
| 850 if (!key_event_watcher_) | 851 if (!key_event_watcher_) |
| 851 return; | 852 return; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 .work_area() | 916 .work_area() |
| 916 .height(); | 917 .height(); |
| 917 if (work_area_height > 0) { | 918 if (work_area_height > 0) { |
| 918 UMA_HISTOGRAM_CUSTOM_COUNTS( | 919 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 919 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", | 920 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", |
| 920 100 * bubble_view->height() / work_area_height, 1, 300, 100); | 921 100 * bubble_view->height() / work_area_height, 1, 300, 100); |
| 921 } | 922 } |
| 922 } | 923 } |
| 923 | 924 |
| 924 } // namespace ash | 925 } // namespace ash |
| OLD | NEW |