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

Side by Side Diff: ash/system/web_notification/web_notification_tray.cc

Issue 1659283002: ash: Explicitly teach various components about ShelfLayoutManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ozone-ui-event-platform-event
Patch Set: . Created 4 years, 10 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/web_notification/web_notification_tray.h" 5 #include "ash/system/web_notification/web_notification_tray.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_layout_manager_observer.h" 10 #include "ash/shelf/shelf_layout_manager_observer.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 should_block_shelf_auto_hide_(false) { 175 should_block_shelf_auto_hide_(false) {
176 button_ = new WebNotificationButton(this); 176 button_ = new WebNotificationButton(this);
177 button_->set_triggerable_event_flags( 177 button_->set_triggerable_event_flags(
178 ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON); 178 ui::EF_LEFT_MOUSE_BUTTON | ui::EF_RIGHT_MOUSE_BUTTON);
179 tray_container()->AddChildView(button_); 179 tray_container()->AddChildView(button_);
180 SetContentsBackground(); 180 SetContentsBackground();
181 tray_container()->SetBorder(views::Border::NullBorder()); 181 tray_container()->SetBorder(views::Border::NullBorder());
182 message_center_tray_.reset(new message_center::MessageCenterTray( 182 message_center_tray_.reset(new message_center::MessageCenterTray(
183 this, 183 this,
184 message_center::MessageCenter::Get())); 184 message_center::MessageCenter::Get()));
185 popup_alignment_delegate_.reset(new AshPopupAlignmentDelegate()); 185 popup_alignment_delegate_.reset(new AshPopupAlignmentDelegate(
186 status_area_widget->shelf_widget()->shelf_layout_manager()));
186 popup_collection_.reset(new message_center::MessagePopupCollection( 187 popup_collection_.reset(new message_center::MessagePopupCollection(
187 ash::Shell::GetContainer( 188 ash::Shell::GetContainer(
188 status_area_widget->GetNativeView()->GetRootWindow(), 189 status_area_widget->GetNativeView()->GetRootWindow(),
189 kShellWindowId_StatusContainer), 190 kShellWindowId_StatusContainer),
190 message_center(), 191 message_center(),
191 message_center_tray_.get(), 192 message_center_tray_.get(),
192 popup_alignment_delegate_.get())); 193 popup_alignment_delegate_.get()));
193 const gfx::Display& display = 194 const gfx::Display& display =
194 gfx::Screen::GetScreen()->GetDisplayNearestWindow( 195 gfx::Screen::GetScreen()->GetDisplayNearestWindow(
195 status_area_widget->GetNativeView()); 196 status_area_widget->GetNativeView());
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 496
496 message_center::MessageCenterBubble* 497 message_center::MessageCenterBubble*
497 WebNotificationTray::GetMessageCenterBubbleForTest() { 498 WebNotificationTray::GetMessageCenterBubbleForTest() {
498 if (!message_center_bubble()) 499 if (!message_center_bubble())
499 return NULL; 500 return NULL;
500 return static_cast<message_center::MessageCenterBubble*>( 501 return static_cast<message_center::MessageCenterBubble*>(
501 message_center_bubble()->bubble()); 502 message_center_bubble()->bubble());
502 } 503 }
503 504
504 } // namespace ash 505 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698