Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Side by Side Diff: ash/common/system/tray/system_tray.cc

Issue 2726823003: Remove WmLookup. (Closed)
Patch Set: Remove wm_lookup. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 29 matching lines...) Expand all
40 #include "ash/common/system/tray/system_tray_delegate.h" 40 #include "ash/common/system/tray/system_tray_delegate.h"
41 #include "ash/common/system/tray/system_tray_item.h" 41 #include "ash/common/system/tray/system_tray_item.h"
42 #include "ash/common/system/tray/tray_bubble_wrapper.h" 42 #include "ash/common/system/tray/tray_bubble_wrapper.h"
43 #include "ash/common/system/tray/tray_constants.h" 43 #include "ash/common/system/tray/tray_constants.h"
44 #include "ash/common/system/tray_accessibility.h" 44 #include "ash/common/system/tray_accessibility.h"
45 #include "ash/common/system/update/tray_update.h" 45 #include "ash/common/system/update/tray_update.h"
46 #include "ash/common/system/user/tray_user.h" 46 #include "ash/common/system/user/tray_user.h"
47 #include "ash/common/system/web_notification/web_notification_tray.h" 47 #include "ash/common/system/web_notification/web_notification_tray.h"
48 #include "ash/common/wm/container_finder.h" 48 #include "ash/common/wm/container_finder.h"
49 #include "ash/common/wm_activation_observer.h" 49 #include "ash/common/wm_activation_observer.h"
50 #include "ash/common/wm_lookup.h"
51 #include "ash/common/wm_shell.h" 50 #include "ash/common/wm_shell.h"
52 #include "ash/common/wm_window.h" 51 #include "ash/common/wm_window.h"
53 #include "ash/public/cpp/shell_window_ids.h" 52 #include "ash/public/cpp/shell_window_ids.h"
54 #include "ash/root_window_controller.h" 53 #include "ash/root_window_controller.h"
55 #include "base/logging.h" 54 #include "base/logging.h"
56 #include "base/memory/ptr_util.h" 55 #include "base/memory/ptr_util.h"
57 #include "base/metrics/histogram_macros.h" 56 #include "base/metrics/histogram_macros.h"
58 #include "base/timer/timer.h" 57 #include "base/timer/timer.h"
59 #include "ui/base/accelerators/accelerator.h" 58 #include "ui/base/accelerators/accelerator.h"
60 #include "ui/base/l10n/l10n_util.h" 59 #include "ui/base/l10n/l10n_util.h"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 754
756 base::string16 SystemTray::GetAccessibleNameForBubble() { 755 base::string16 SystemTray::GetAccessibleNameForBubble() {
757 return GetAccessibleNameForTray(); 756 return GetAccessibleNameForTray();
758 } 757 }
759 758
760 void SystemTray::OnBeforeBubbleWidgetInit( 759 void SystemTray::OnBeforeBubbleWidgetInit(
761 views::Widget* anchor_widget, 760 views::Widget* anchor_widget,
762 views::Widget* bubble_widget, 761 views::Widget* bubble_widget,
763 views::Widget::InitParams* params) const { 762 views::Widget::InitParams* params) const {
764 // Place the bubble in the same root window as |anchor_widget|. 763 // Place the bubble in the same root window as |anchor_widget|.
765 WmLookup::Get() 764 WmWindow::Get(anchor_widget->GetNativeWindow())
766 ->GetWindowForWidget(anchor_widget)
767 ->GetRootWindowController() 765 ->GetRootWindowController()
768 ->ConfigureWidgetInitParamsForContainer( 766 ->ConfigureWidgetInitParamsForContainer(
769 bubble_widget, kShellWindowId_SettingBubbleContainer, params); 767 bubble_widget, kShellWindowId_SettingBubbleContainer, params);
770 } 768 }
771 769
772 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { 770 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) {
773 HideBubbleWithView(bubble_view); 771 HideBubbleWithView(bubble_view);
774 } 772 }
775 773
776 views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) { 774 views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 .work_area() 886 .work_area()
889 .height(); 887 .height();
890 if (work_area_height > 0) { 888 if (work_area_height > 0) {
891 UMA_HISTOGRAM_CUSTOM_COUNTS( 889 UMA_HISTOGRAM_CUSTOM_COUNTS(
892 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", 890 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu",
893 100 * bubble_view->height() / work_area_height, 1, 300, 100); 891 100 * bubble_view->height() / work_area_height, 1, 300, 100);
894 } 892 }
895 } 893 }
896 894
897 } // namespace ash 895 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698