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

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

Issue 2726823003: Remove WmLookup. (Closed)
Patch Set: Clean up include and modify comment. 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 28 matching lines...) Expand all
39 #include "ash/common/system/tray/system_tray_delegate.h" 39 #include "ash/common/system/tray/system_tray_delegate.h"
40 #include "ash/common/system/tray/system_tray_item.h" 40 #include "ash/common/system/tray/system_tray_item.h"
41 #include "ash/common/system/tray/tray_bubble_wrapper.h" 41 #include "ash/common/system/tray/tray_bubble_wrapper.h"
42 #include "ash/common/system/tray/tray_constants.h" 42 #include "ash/common/system/tray/tray_constants.h"
43 #include "ash/common/system/tray_accessibility.h" 43 #include "ash/common/system/tray_accessibility.h"
44 #include "ash/common/system/update/tray_update.h" 44 #include "ash/common/system/update/tray_update.h"
45 #include "ash/common/system/user/tray_user.h" 45 #include "ash/common/system/user/tray_user.h"
46 #include "ash/common/system/web_notification/web_notification_tray.h" 46 #include "ash/common/system/web_notification/web_notification_tray.h"
47 #include "ash/common/wm/container_finder.h" 47 #include "ash/common/wm/container_finder.h"
48 #include "ash/common/wm_activation_observer.h" 48 #include "ash/common/wm_activation_observer.h"
49 #include "ash/common/wm_lookup.h"
50 #include "ash/common/wm_shell.h" 49 #include "ash/common/wm_shell.h"
51 #include "ash/common/wm_window.h" 50 #include "ash/common/wm_window.h"
52 #include "ash/public/cpp/shell_window_ids.h" 51 #include "ash/public/cpp/shell_window_ids.h"
53 #include "ash/root_window_controller.h" 52 #include "ash/root_window_controller.h"
54 #include "ash/strings/grit/ash_strings.h" 53 #include "ash/strings/grit/ash_strings.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"
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 635
637 base::string16 SystemTray::GetAccessibleNameForBubble() { 636 base::string16 SystemTray::GetAccessibleNameForBubble() {
638 return GetAccessibleNameForTray(); 637 return GetAccessibleNameForTray();
639 } 638 }
640 639
641 void SystemTray::OnBeforeBubbleWidgetInit( 640 void SystemTray::OnBeforeBubbleWidgetInit(
642 views::Widget* anchor_widget, 641 views::Widget* anchor_widget,
643 views::Widget* bubble_widget, 642 views::Widget* bubble_widget,
644 views::Widget::InitParams* params) const { 643 views::Widget::InitParams* params) const {
645 // Place the bubble in the same root window as |anchor_widget|. 644 // Place the bubble in the same root window as |anchor_widget|.
646 WmLookup::Get() 645 WmWindow::Get(anchor_widget->GetNativeWindow())
647 ->GetWindowForWidget(anchor_widget)
648 ->GetRootWindowController() 646 ->GetRootWindowController()
649 ->ConfigureWidgetInitParamsForContainer( 647 ->ConfigureWidgetInitParamsForContainer(
650 bubble_widget, kShellWindowId_SettingBubbleContainer, params); 648 bubble_widget, kShellWindowId_SettingBubbleContainer, params);
651 } 649 }
652 650
653 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { 651 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) {
654 HideBubbleWithView(bubble_view); 652 HideBubbleWithView(bubble_view);
655 } 653 }
656 654
657 views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) { 655 views::View* SystemTray::GetTrayItemViewForTest(SystemTrayItem* item) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 .work_area() 767 .work_area()
770 .height(); 768 .height();
771 if (work_area_height > 0) { 769 if (work_area_height > 0) {
772 UMA_HISTOGRAM_CUSTOM_COUNTS( 770 UMA_HISTOGRAM_CUSTOM_COUNTS(
773 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", 771 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu",
774 100 * bubble_view->height() / work_area_height, 1, 300, 100); 772 100 * bubble_view->height() / work_area_height, 1, 300, 100);
775 } 773 }
776 } 774 }
777 775
778 } // namespace ash 776 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/toast/toast_overlay.cc ('k') | ash/common/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698