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

Side by Side Diff: chrome/browser/ui/views/message_center/web_notification_tray.h

Issue 23636010: Notifications: Add cross-platform UMA: ShowMessageCenter, ShowSettings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added the hash to chromeactions.txt Created 7 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_
6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ 6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/status_icons/status_icon_menu_model.h" 9 #include "chrome/browser/status_icons/status_icon_menu_model.h"
10 #include "chrome/browser/status_icons/status_icon_observer.h" 10 #include "chrome/browser/status_icons/status_icon_observer.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 gfx::Point mouse_click_point() { return mouse_click_point_; } 78 gfx::Point mouse_click_point() { return mouse_click_point_; }
79 virtual MessageCenterTray* GetMessageCenterTray() OVERRIDE; 79 virtual MessageCenterTray* GetMessageCenterTray() OVERRIDE;
80 80
81 private: 81 private:
82 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); 82 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications);
83 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); 83 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble);
84 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, 84 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest,
85 ManyMessageCenterNotifications); 85 ManyMessageCenterNotifications);
86 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications); 86 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications);
87 87
88 // The actual process to show the message center. Set |show_settings| to true
89 // if the message center should be initialized with the settings visible.
90 // Returns true if the center is successfully created.
91 bool ShowMessageCenterInternal(bool show_settings);
92
93 PositionInfo GetPositionInfo(); 88 PositionInfo GetPositionInfo();
94 89
95 void CreateStatusIcon(const gfx::ImageSkia& image, const string16& tool_tip); 90 void CreateStatusIcon(const gfx::ImageSkia& image, const string16& tool_tip);
96 void DestroyStatusIcon(); 91 void DestroyStatusIcon();
97 void AddQuietModeMenu(StatusIcon* status_icon); 92 void AddQuietModeMenu(StatusIcon* status_icon);
98 MessageCenterWidgetDelegate* GetMessageCenterWidgetDelegateForTest(); 93 MessageCenterWidgetDelegate* GetMessageCenterWidgetDelegateForTest();
99 94
100 MessageCenterWidgetDelegate* message_center_delegate_; 95 MessageCenterWidgetDelegate* message_center_delegate_;
101 scoped_ptr<message_center::MessagePopupCollection> popup_collection_; 96 scoped_ptr<message_center::MessagePopupCollection> popup_collection_;
102 97
103 StatusIcon* status_icon_; 98 StatusIcon* status_icon_;
104 StatusIconMenuModel* status_icon_menu_; 99 StatusIconMenuModel* status_icon_menu_;
105 bool message_center_visible_; 100 bool message_center_visible_;
106 scoped_ptr<MessageCenterTray> message_center_tray_; 101 scoped_ptr<MessageCenterTray> message_center_tray_;
107 gfx::Point mouse_click_point_; 102 gfx::Point mouse_click_point_;
108 103
109 bool should_update_tray_content_; 104 bool should_update_tray_content_;
110 bool last_quiet_mode_state_; 105 bool last_quiet_mode_state_;
111 106
112 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); 107 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray);
113 }; 108 };
114 109
115 } // namespace message_center 110 } // namespace message_center
116 111
117 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ 112 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698