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

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

Issue 115113006: Rename Launcher to Shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ShelfTestAPI Created 7 years 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 | Annotate | Revision Log
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 if (shelf_->GetAlignment() == SHELF_ALIGNMENT_TOP) 188 if (shelf_->GetAlignment() == SHELF_ALIGNMENT_TOP)
189 work_area.set_y(work_area.y() + system_tray_height_); 189 work_area.set_y(work_area.y() + system_tray_height_);
190 } 190 }
191 collection_->SetDisplayInfo(work_area, display.bounds()); 191 collection_->SetDisplayInfo(work_area, display.bounds());
192 } 192 }
193 193
194 void WorkAreaObserver::UpdateShelf() { 194 void WorkAreaObserver::UpdateShelf() {
195 if (shelf_) 195 if (shelf_)
196 return; 196 return;
197 197
198 shelf_ = ShelfLayoutManager::ForLauncher(root_window_); 198 shelf_ = ShelfLayoutManager::ForShelf(root_window_);
199 if (shelf_) 199 if (shelf_)
200 shelf_->AddObserver(this); 200 shelf_->AddObserver(this);
201 } 201 }
202 202
203 // Class to initialize and manage the WebNotificationBubble and 203 // Class to initialize and manage the WebNotificationBubble and
204 // TrayBubbleWrapper instances for a bubble. 204 // TrayBubbleWrapper instances for a bubble.
205 class WebNotificationBubbleWrapper { 205 class WebNotificationBubbleWrapper {
206 public: 206 public:
207 // Takes ownership of |bubble| and creates |bubble_wrapper_|. 207 // Takes ownership of |bubble| and creates |bubble_wrapper_|.
208 WebNotificationBubbleWrapper(WebNotificationTray* tray, 208 WebNotificationBubbleWrapper(WebNotificationTray* tray,
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 424 }
425 425
426 // Private methods. 426 // Private methods.
427 427
428 bool WebNotificationTray::ShouldShowMessageCenter() { 428 bool WebNotificationTray::ShouldShowMessageCenter() {
429 return status_area_widget()->login_status() != user::LOGGED_IN_LOCKED && 429 return status_area_widget()->login_status() != user::LOGGED_IN_LOCKED &&
430 !(status_area_widget()->system_tray() && 430 !(status_area_widget()->system_tray() &&
431 status_area_widget()->system_tray()->HasNotificationBubble()); 431 status_area_widget()->system_tray()->HasNotificationBubble());
432 } 432 }
433 433
434 bool WebNotificationTray::ShouldBlockLauncherAutoHide() const { 434 bool WebNotificationTray::ShouldBlockShelfAutoHide() const {
435 return should_block_shelf_auto_hide_; 435 return should_block_shelf_auto_hide_;
436 } 436 }
437 437
438 bool WebNotificationTray::IsMessageCenterBubbleVisible() const { 438 bool WebNotificationTray::IsMessageCenterBubbleVisible() const {
439 return (message_center_bubble() && 439 return (message_center_bubble() &&
440 message_center_bubble()->bubble()->IsVisible()); 440 message_center_bubble()->bubble()->IsVisible());
441 } 441 }
442 442
443 bool WebNotificationTray::IsMouseInNotificationBubble() const { 443 bool WebNotificationTray::IsMouseInNotificationBubble() const {
444 return false; 444 return false;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 615
616 message_center::MessageCenterBubble* 616 message_center::MessageCenterBubble*
617 WebNotificationTray::GetMessageCenterBubbleForTest() { 617 WebNotificationTray::GetMessageCenterBubbleForTest() {
618 if (!message_center_bubble()) 618 if (!message_center_bubble())
619 return NULL; 619 return NULL;
620 return static_cast<message_center::MessageCenterBubble*>( 620 return static_cast<message_center::MessageCenterBubble*>(
621 message_center_bubble()->bubble()); 621 message_center_bubble()->bubble());
622 } 622 }
623 623
624 } // namespace ash 624 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698