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

Side by Side Diff: ash/common/system/web_notification/web_notification_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/web_notification/web_notification_tray.h" 5 #include "ash/common/system/web_notification/web_notification_tray.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/shelf/shelf_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
11 #include "ash/common/shelf/wm_shelf_util.h" 11 #include "ash/common/shelf/wm_shelf_util.h"
12 #include "ash/common/strings/grit/ash_strings.h" 12 #include "ash/common/strings/grit/ash_strings.h"
13 #include "ash/common/system/status_area_widget.h" 13 #include "ash/common/system/status_area_widget.h"
14 #include "ash/common/system/tray/system_tray.h" 14 #include "ash/common/system/tray/system_tray.h"
15 #include "ash/common/system/tray/system_tray_delegate.h" 15 #include "ash/common/system/tray/system_tray_delegate.h"
16 #include "ash/common/system/tray/tray_bubble_wrapper.h" 16 #include "ash/common/system/tray/tray_bubble_wrapper.h"
17 #include "ash/common/system/tray/tray_constants.h" 17 #include "ash/common/system/tray/tray_constants.h"
18 #include "ash/common/system/tray/tray_utils.h" 18 #include "ash/common/system/tray/tray_utils.h"
19 #include "ash/common/system/web_notification/ash_popup_alignment_delegate.h" 19 #include "ash/common/system/web_notification/ash_popup_alignment_delegate.h"
20 #include "ash/common/wm_lookup.h"
21 #include "ash/common/wm_shell.h" 20 #include "ash/common/wm_shell.h"
22 #include "ash/common/wm_window.h" 21 #include "ash/common/wm_window.h"
23 #include "ash/public/cpp/shell_window_ids.h" 22 #include "ash/public/cpp/shell_window_ids.h"
24 #include "ash/resources/vector_icons/vector_icons.h" 23 #include "ash/resources/vector_icons/vector_icons.h"
25 #include "ash/root_window_controller.h" 24 #include "ash/root_window_controller.h"
26 #include "base/auto_reset.h" 25 #include "base/auto_reset.h"
27 #include "base/i18n/number_formatting.h" 26 #include "base/i18n/number_formatting.h"
28 #include "base/i18n/rtl.h" 27 #include "base/i18n/rtl.h"
29 #include "base/strings/utf_string_conversions.h" 28 #include "base/strings/utf_string_conversions.h"
30 #include "base/threading/thread_task_runner_handle.h" 29 #include "base/threading/thread_task_runner_handle.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 496
498 base::string16 WebNotificationTray::GetAccessibleNameForBubble() { 497 base::string16 WebNotificationTray::GetAccessibleNameForBubble() {
499 return GetAccessibleNameForTray(); 498 return GetAccessibleNameForTray();
500 } 499 }
501 500
502 void WebNotificationTray::OnBeforeBubbleWidgetInit( 501 void WebNotificationTray::OnBeforeBubbleWidgetInit(
503 views::Widget* anchor_widget, 502 views::Widget* anchor_widget,
504 views::Widget* bubble_widget, 503 views::Widget* bubble_widget,
505 views::Widget::InitParams* params) const { 504 views::Widget::InitParams* params) const {
506 // Place the bubble in the same root window as |anchor_widget|. 505 // Place the bubble in the same root window as |anchor_widget|.
507 WmLookup::Get() 506 WmWindow::Get(anchor_widget->GetNativeWindow())
508 ->GetWindowForWidget(anchor_widget)
509 ->GetRootWindowController() 507 ->GetRootWindowController()
510 ->ConfigureWidgetInitParamsForContainer( 508 ->ConfigureWidgetInitParamsForContainer(
511 bubble_widget, kShellWindowId_SettingBubbleContainer, params); 509 bubble_widget, kShellWindowId_SettingBubbleContainer, params);
512 } 510 }
513 511
514 void WebNotificationTray::HideBubble(const views::TrayBubbleView* bubble_view) { 512 void WebNotificationTray::HideBubble(const views::TrayBubbleView* bubble_view) {
515 HideBubbleWithView(bubble_view); 513 HideBubbleWithView(bubble_view);
516 } 514 }
517 515
518 bool WebNotificationTray::ShowNotifierSettings() { 516 bool WebNotificationTray::ShowNotifierSettings() {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 656
659 message_center::MessageCenterBubble* 657 message_center::MessageCenterBubble*
660 WebNotificationTray::GetMessageCenterBubbleForTest() { 658 WebNotificationTray::GetMessageCenterBubbleForTest() {
661 if (!message_center_bubble()) 659 if (!message_center_bubble())
662 return nullptr; 660 return nullptr;
663 return static_cast<message_center::MessageCenterBubble*>( 661 return static_cast<message_center::MessageCenterBubble*>(
664 message_center_bubble()->bubble()); 662 message_center_bubble()->bubble());
665 } 663 }
666 664
667 } // namespace ash 665 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698