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

Side by Side Diff: ash/system/status_area_widget.h

Issue 10514008: Add WebNotificationTray (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 6 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/shell/window_type_launcher.cc ('k') | ash/system/status_area_widget.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 #ifndef ASH_SYSTEM_STATUS_AREA_WIDGET_H_ 5 #ifndef ASH_SYSTEM_STATUS_AREA_WIDGET_H_
6 #define ASH_SYSTEM_STATUS_AREA_WIDGET_H_ 6 #define ASH_SYSTEM_STATUS_AREA_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "ash/wm/shelf_auto_hide_behavior.h" 10 #include "ash/wm/shelf_auto_hide_behavior.h"
11 #include "ui/views/widget/widget.h" 11 #include "ui/views/widget/widget.h"
12 12
13 namespace ash { 13 namespace ash {
14
15 class ShellDelegate;
16 class SystemTray;
17 class SystemTrayDelegate;
18 class WebNotificationTray;
19
14 namespace internal { 20 namespace internal {
15 21
16 class StatusAreaWidgetDelegate; 22 class StatusAreaWidgetDelegate;
17 23
18 class ASH_EXPORT StatusAreaWidget : public views::Widget { 24 class ASH_EXPORT StatusAreaWidget : public views::Widget {
19 public: 25 public:
26 enum UserAction {
27 NON_USER_ACTION,
28 USER_ACTION
29 };
30
20 StatusAreaWidget(); 31 StatusAreaWidget();
21 virtual ~StatusAreaWidget(); 32 virtual ~StatusAreaWidget();
22 33
23 void AddTray(views::View* tray); 34 // Creates a SystemTray and a WebNotificationTray.
35 void CreateTrayViews(ShellDelegate* shell_delegate);
36
37 // Destroys the system tray and web notification tray. Called before
38 // tearing down the windows to avoid shutdown problems.
39 void Shutdown();
40
41 void AddSystemTray(SystemTray* system_tray, ShellDelegate* shell_delegate);
42 void AddWebNotificationTray(WebNotificationTray* web_notification_tray);
24 void SetShelfAlignment(ShelfAlignment alignment); 43 void SetShelfAlignment(ShelfAlignment alignment);
25 44
45 // Always used to show/hide the web notification tray. These handle any logic
46 // with hiding/supressing notifications from the system tray.
47 void ShowWebNotificationBubble(UserAction user_action);
48 void HideWebNotificationBubble();
49
50 SystemTray* system_tray() { return system_tray_; }
51 SystemTrayDelegate* system_tray_delegate() {
52 return system_tray_delegate_.get();
53 }
54 WebNotificationTray* web_notification_tray() {
55 return web_notification_tray_;
56 }
57
26 private: 58 private:
27 internal::StatusAreaWidgetDelegate* widget_delegate_; 59 internal::StatusAreaWidgetDelegate* widget_delegate_;
60 scoped_ptr<SystemTrayDelegate> system_tray_delegate_;
61 // Child views owned by the view hierarchy:
62 SystemTray* system_tray_;
63 WebNotificationTray* web_notification_tray_;
28 64
29 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget); 65 DISALLOW_COPY_AND_ASSIGN(StatusAreaWidget);
30 }; 66 };
31 67
32 } // namespace internal 68 } // namespace internal
33 } // namespace ash 69 } // namespace ash
34 70
35 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_ 71 #endif // ASH_SYSTEM_STATUS_AREA_WIDGET_H_
OLDNEW
« no previous file with comments | « ash/shell/window_type_launcher.cc ('k') | ash/system/status_area_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698