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

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

Issue 11229022: Move ash/system/web_notification message_center to ui/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again. Created 8 years, 1 month 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/tray/system_tray.h ('k') | ash/system/tray/system_tray_bubble.h » ('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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "ui/views/layout/box_layout.h" 46 #include "ui/views/layout/box_layout.h"
47 #include "ui/views/layout/fill_layout.h" 47 #include "ui/views/layout/fill_layout.h"
48 #include "ui/views/view.h" 48 #include "ui/views/view.h"
49 49
50 #if defined(OS_CHROMEOS) 50 #if defined(OS_CHROMEOS)
51 #include "ash/system/chromeos/network/tray_network.h" 51 #include "ash/system/chromeos/network/tray_network.h"
52 #include "ash/system/chromeos/network/tray_sms.h" 52 #include "ash/system/chromeos/network/tray_sms.h"
53 #include "ash/system/chromeos/network/tray_vpn.h" 53 #include "ash/system/chromeos/network/tray_vpn.h"
54 #endif 54 #endif
55 55
56 using message_center::TrayBubbleView; 56 using views::TrayBubbleView;
57 57
58 namespace ash { 58 namespace ash {
59 59
60 namespace internal { 60 namespace internal {
61 61
62 // Class to initialize and manage the SystemTrayBubble and TrayBubbleWrapper 62 // Class to initialize and manage the SystemTrayBubble and TrayBubbleWrapper
63 // instances for a bubble. 63 // instances for a bubble.
64 64
65 class SystemBubbleWrapper { 65 class SystemBubbleWrapper {
66 public: 66 public:
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 notification_bubble_.reset(); 498 notification_bubble_.reset();
499 UpdateNotificationBubble(); 499 UpdateNotificationBubble();
500 } 500 }
501 } 501 }
502 502
503 void SystemTray::AnchorUpdated() { 503 void SystemTray::AnchorUpdated() {
504 if (notification_bubble_.get()) { 504 if (notification_bubble_.get()) {
505 notification_bubble_->bubble_view()->UpdateBubble(); 505 notification_bubble_->bubble_view()->UpdateBubble();
506 // Ensure that the notification buble is above the launcher/status area. 506 // Ensure that the notification buble is above the launcher/status area.
507 notification_bubble_->bubble_view()->GetWidget()->StackAtTop(); 507 notification_bubble_->bubble_view()->GetWidget()->StackAtTop();
508 UpdateBubbleViewArrow(notification_bubble_->bubble_view());
508 } 509 }
509 if (system_bubble_.get()) 510 if (system_bubble_.get()) {
510 system_bubble_->bubble_view()->UpdateBubble(); 511 system_bubble_->bubble_view()->UpdateBubble();
512 UpdateBubbleViewArrow(system_bubble_->bubble_view());
513 }
511 } 514 }
512 515
513 string16 SystemTray::GetAccessibleNameForTray() { 516 string16 SystemTray::GetAccessibleNameForTray() {
514 return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME); 517 return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ACCESSIBLE_NAME);
515 } 518 }
516 519
517 void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) { 520 void SystemTray::HideBubbleWithView(const TrayBubbleView* bubble_view) {
518 if (system_bubble_.get() && bubble_view == system_bubble_->bubble_view()) { 521 if (system_bubble_.get() && bubble_view == system_bubble_->bubble_view()) {
519 DestroySystemBubble(); 522 DestroySystemBubble();
520 UpdateNotificationBubble(); // State changed, re-create notifications. 523 UpdateNotificationBubble(); // State changed, re-create notifications.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 ConvertPointToWidget(this, &point); 582 ConvertPointToWidget(this, &point);
580 arrow_offset = point.x(); 583 arrow_offset = point.x();
581 } 584 }
582 } 585 }
583 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset); 586 ShowDefaultViewWithOffset(BUBBLE_CREATE_NEW, arrow_offset);
584 } 587 }
585 return true; 588 return true;
586 } 589 }
587 590
588 } // namespace ash 591 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray.h ('k') | ash/system/tray/system_tray_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698