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

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

Issue 19291004: Observes work area change and auto-hide for notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 5 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/shelf/shelf_layout_manager.cc ('k') | ash/system/web_notification/web_notification_tray.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_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ 5 #ifndef ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_
6 #define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ 6 #define ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/system/tray/tray_background_view.h" 9 #include "ash/system/tray/tray_background_view.h"
10 #include "ash/system/user/login_status.h" 10 #include "ash/system/user/login_status.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 namespace message_center { 32 namespace message_center {
33 class MessageBubbleBase; 33 class MessageBubbleBase;
34 class MessageCenter; 34 class MessageCenter;
35 class MessageCenterBubble; 35 class MessageCenterBubble;
36 class MessagePopupCollection; 36 class MessagePopupCollection;
37 } 37 }
38 38
39 namespace ash { 39 namespace ash {
40
41 namespace internal { 40 namespace internal {
42 class StatusAreaWidget; 41 class StatusAreaWidget;
43 class WebNotificationBubbleWrapper; 42 class WebNotificationBubbleWrapper;
44 class WebNotificationButton; 43 class WebNotificationButton;
44 class WorkAreaObserver;
45 } 45 }
46 46
47 class ASH_EXPORT WebNotificationTray 47 class ASH_EXPORT WebNotificationTray
48 : public internal::TrayBackgroundView, 48 : public internal::TrayBackgroundView,
49 public views::TrayBubbleView::Delegate, 49 public views::TrayBubbleView::Delegate,
50 public message_center::MessageCenterTrayDelegate, 50 public message_center::MessageCenterTrayDelegate,
51 public views::ButtonListener, 51 public views::ButtonListener,
52 public base::SupportsWeakPtr<WebNotificationTray> { 52 public base::SupportsWeakPtr<WebNotificationTray> {
53 public: 53 public:
54 explicit WebNotificationTray( 54 explicit WebNotificationTray(
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 bool show_message_center_on_unlock_; 152 bool show_message_center_on_unlock_;
153 153
154 bool should_update_tray_content_; 154 bool should_update_tray_content_;
155 155
156 // True when the shelf auto hide behavior has to be blocked. Previously 156 // True when the shelf auto hide behavior has to be blocked. Previously
157 // this was done by checking |message_center_bubble_| but actually 157 // this was done by checking |message_center_bubble_| but actually
158 // the check can be called when creating this object, so it would cause 158 // the check can be called when creating this object, so it would cause
159 // flickers of the shelf from hidden to shown. See: crbug.com/181213 159 // flickers of the shelf from hidden to shown. See: crbug.com/181213
160 bool should_block_shelf_auto_hide_; 160 bool should_block_shelf_auto_hide_;
161 161
162 // Observes the work area for |popup_collection_| and notifies to it.
163 scoped_ptr<internal::WorkAreaObserver> work_area_observer_;
164
162 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); 165 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray);
163 }; 166 };
164 167
165 } // namespace ash 168 } // namespace ash
166 169
167 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ 170 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/system/web_notification/web_notification_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698