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

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

Issue 2888013002: chromeos: Remove some WmWindow usage from ash/system (Closed)
Patch Set: header Created 3 years, 7 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/system/tray/system_tray.h" 5 #include "ash/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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "ash/system/tray/tray_constants.h" 43 #include "ash/system/tray/tray_constants.h"
44 #include "ash/system/tray/tray_container.h" 44 #include "ash/system/tray/tray_container.h"
45 #include "ash/system/tray_accessibility.h" 45 #include "ash/system/tray_accessibility.h"
46 #include "ash/system/tray_caps_lock.h" 46 #include "ash/system/tray_caps_lock.h"
47 #include "ash/system/tray_tracing.h" 47 #include "ash/system/tray_tracing.h"
48 #include "ash/system/update/tray_update.h" 48 #include "ash/system/update/tray_update.h"
49 #include "ash/system/user/tray_user.h" 49 #include "ash/system/user/tray_user.h"
50 #include "ash/system/web_notification/web_notification_tray.h" 50 #include "ash/system/web_notification/web_notification_tray.h"
51 #include "ash/wm/container_finder.h" 51 #include "ash/wm/container_finder.h"
52 #include "ash/wm/widget_finder.h" 52 #include "ash/wm/widget_finder.h"
53 #include "ash/wm_window.h"
54 #include "base/logging.h" 53 #include "base/logging.h"
55 #include "base/memory/ptr_util.h" 54 #include "base/memory/ptr_util.h"
56 #include "base/metrics/histogram_macros.h" 55 #include "base/metrics/histogram_macros.h"
57 #include "base/timer/timer.h" 56 #include "base/timer/timer.h"
58 #include "ui/base/accelerators/accelerator.h" 57 #include "ui/base/accelerators/accelerator.h"
59 #include "ui/base/l10n/l10n_util.h" 58 #include "ui/base/l10n/l10n_util.h"
60 #include "ui/compositor/layer.h" 59 #include "ui/compositor/layer.h"
61 #include "ui/display/display.h" 60 #include "ui/display/display.h"
62 #include "ui/display/screen.h" 61 #include "ui/display/screen.h"
63 #include "ui/events/event_constants.h" 62 #include "ui/events/event_constants.h"
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 591
593 base::string16 SystemTray::GetAccessibleNameForBubble() { 592 base::string16 SystemTray::GetAccessibleNameForBubble() {
594 return GetAccessibleNameForTray(); 593 return GetAccessibleNameForTray();
595 } 594 }
596 595
597 void SystemTray::OnBeforeBubbleWidgetInit( 596 void SystemTray::OnBeforeBubbleWidgetInit(
598 views::Widget* anchor_widget, 597 views::Widget* anchor_widget,
599 views::Widget* bubble_widget, 598 views::Widget* bubble_widget,
600 views::Widget::InitParams* params) const { 599 views::Widget::InitParams* params) const {
601 // Place the bubble in the same root window as |anchor_widget|. 600 // Place the bubble in the same root window as |anchor_widget|.
602 WmWindow::Get(anchor_widget->GetNativeWindow()) 601 RootWindowController::ForWindow(anchor_widget->GetNativeWindow())
603 ->GetRootWindowController()
604 ->ConfigureWidgetInitParamsForContainer( 602 ->ConfigureWidgetInitParamsForContainer(
605 bubble_widget, kShellWindowId_SettingBubbleContainer, params); 603 bubble_widget, kShellWindowId_SettingBubbleContainer, params);
606 } 604 }
607 605
608 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) { 606 void SystemTray::HideBubble(const TrayBubbleView* bubble_view) {
609 HideBubbleWithView(bubble_view); 607 HideBubbleWithView(bubble_view);
610 } 608 }
611 609
612 TrayCast* SystemTray::GetTrayCastForTesting() const { 610 TrayCast* SystemTray::GetTrayCastForTesting() const {
613 return tray_cast_; 611 return tray_cast_;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 .work_area() 720 .work_area()
723 .height(); 721 .height();
724 if (work_area_height > 0) { 722 if (work_area_height > 0) {
725 UMA_HISTOGRAM_CUSTOM_COUNTS( 723 UMA_HISTOGRAM_CUSTOM_COUNTS(
726 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu", 724 "Ash.SystemMenu.PercentageOfWorkAreaHeightCoveredByMenu",
727 100 * bubble_view->height() / work_area_height, 1, 300, 100); 725 100 * bubble_view->height() / work_area_height, 1, 300, 100);
728 } 726 }
729 } 727 }
730 728
731 } // namespace ash 729 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698