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

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

Issue 11017079: Remove Shell::shelf()|status_area_widget()|launcher() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell/panel_window.h" 8 #include "ash/shell/panel_window.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/audio/tray_volume.h" 10 #include "ash/system/audio/tray_volume.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 if (!detailed) 338 if (!detailed)
339 default_bubble_height_ = bubble_->bubble_view()->height(); 339 default_bubble_height_ = bubble_->bubble_view()->height();
340 340
341 if (detailed && items.size() > 0) 341 if (detailed && items.size() > 0)
342 detailed_item_ = items[0]; 342 detailed_item_ = items[0];
343 else 343 else
344 detailed_item_ = NULL; 344 detailed_item_ = NULL;
345 345
346 UpdateNotificationBubble(); // State changed, re-create notifications. 346 UpdateNotificationBubble(); // State changed, re-create notifications.
347 status_area_widget()->SetHideWebNotifications(true); 347 status_area_widget()->SetHideWebNotifications(true);
348 Shell::GetInstance()->shelf()->UpdateAutoHideState(); 348 GetShelfLayoutManager()->UpdateAutoHideState();
349 } 349 }
350 350
351 void SystemTray::UpdateNotificationBubble() { 351 void SystemTray::UpdateNotificationBubble() {
352 // Only show the notification buble if we have notifications and we are not 352 // Only show the notification buble if we have notifications and we are not
353 // showing the default bubble. 353 // showing the default bubble.
354 if (notification_items_.empty() || 354 if (notification_items_.empty() ||
355 (bubble_.get() && 355 (bubble_.get() &&
356 bubble_->bubble_type() == SystemTrayBubble::BUBBLE_TYPE_DEFAULT)) { 356 bubble_->bubble_type() == SystemTrayBubble::BUBBLE_TYPE_DEFAULT)) {
357 DestroyNotificationBubble(); 357 DestroyNotificationBubble();
358 return; 358 return;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 } 437 }
438 438
439 string16 SystemTray::GetAccessibleName() { 439 string16 SystemTray::GetAccessibleName() {
440 return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME); 440 return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME);
441 } 441 }
442 442
443 void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) { 443 void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) {
444 if (bubble_.get() && bubble_view == bubble_->bubble_view()) { 444 if (bubble_.get() && bubble_view == bubble_->bubble_view()) {
445 DestroyBubble(); 445 DestroyBubble();
446 UpdateNotificationBubble(); // State changed, re-create notifications. 446 UpdateNotificationBubble(); // State changed, re-create notifications.
447 Shell::GetInstance()->shelf()->UpdateAutoHideState(); 447 GetShelfLayoutManager()->UpdateAutoHideState();
448 } else if (notification_bubble_.get() && 448 } else if (notification_bubble_.get() &&
449 bubble_view == notification_bubble_->bubble_view()) { 449 bubble_view == notification_bubble_->bubble_view()) {
450 DestroyNotificationBubble(); 450 DestroyNotificationBubble();
451 } 451 }
452 } 452 }
453 453
454 bool SystemTray::ClickedOutsideBubble() { 454 bool SystemTray::ClickedOutsideBubble() {
455 if (!bubble_.get() || 455 if (!bubble_.get() ||
456 bubble_->bubble_type() == SystemTrayBubble::BUBBLE_TYPE_NOTIFICATION) { 456 bubble_->bubble_type() == SystemTrayBubble::BUBBLE_TYPE_NOTIFICATION) {
457 return false; 457 return false;
(...skipping 18 matching lines...) Expand all
476 ConvertPointToWidget(this, &point); 476 ConvertPointToWidget(this, &point);
477 arrow_offset = point.x(); 477 arrow_offset = point.x();
478 } 478 }
479 } 479 }
480 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); 480 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset);
481 } 481 }
482 return true; 482 return true;
483 } 483 }
484 484
485 } // namespace ash 485 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/status_area_widget.cc ('k') | ash/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698