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

Side by Side Diff: ui/message_center/views/message_center_view.h

Issue 114323002: Fixes the context menu for a notification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix2 Created 7 years 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ 5 #ifndef UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_
6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ 6 #define UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_
7 7
8 #include "ui/views/view.h"
9 8
10 #include "ui/gfx/animation/animation_delegate.h" 9 #include "ui/gfx/animation/animation_delegate.h"
11 #include "ui/message_center/message_center_export.h" 10 #include "ui/message_center/message_center_export.h"
12 #include "ui/message_center/message_center_observer.h" 11 #include "ui/message_center/message_center_observer.h"
13 #include "ui/message_center/notification_list.h" 12 #include "ui/message_center/notification_list.h"
14 #include "ui/message_center/views/message_center_controller.h" 13 #include "ui/message_center/views/message_center_controller.h"
15 #include "ui/message_center/views/message_view.h" 14 #include "ui/message_center/views/message_view.h"
16 #include "ui/views/controls/button/button.h" 15 #include "ui/views/controls/button/button.h"
16 #include "ui/views/view.h"
17 17
18 namespace gfx { 18 namespace gfx {
19 class MultiAnimation; 19 class MultiAnimation;
20 } // namespace gfx 20 } // namespace gfx
21 21
22 namespace views { 22 namespace views {
23 class Button; 23 class Button;
24 } // namespace views 24 } // namespace views
25 25
26 namespace message_center { 26 namespace message_center {
27 27
28 class GroupView; 28 class GroupView;
29 class MessageCenter; 29 class MessageCenter;
30 class MessageCenterBubble; 30 class MessageCenterBubble;
31 class NotificationCenterButton; 31 class NotificationCenterButton;
32 class MessageCenterButtonBar; 32 class MessageCenterButtonBar;
33 class MessageCenterTray; 33 class MessageCenterTray;
34 class MessageCenterView; 34 class MessageCenterView;
35 class MessageView; 35 class MessageView;
36 class MessageViewContextMenuController;
36 class MessageListView; 37 class MessageListView;
37 class NotificationView; 38 class NotificationView;
38 class NotifierSettingsView; 39 class NotifierSettingsView;
39 40
40 // MessageCenterView /////////////////////////////////////////////////////////// 41 // MessageCenterView ///////////////////////////////////////////////////////////
41 42
42 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View, 43 class MESSAGE_CENTER_EXPORT MessageCenterView : public views::View,
43 public MessageCenterObserver, 44 public MessageCenterObserver,
44 public MessageCenterController, 45 public MessageCenterController,
45 public gfx::AnimationDelegate { 46 public gfx::AnimationDelegate {
(...skipping 29 matching lines...) Expand all
75 // Overridden from MessageCenterObserver: 76 // Overridden from MessageCenterObserver:
76 virtual void OnNotificationAdded(const std::string& id) OVERRIDE; 77 virtual void OnNotificationAdded(const std::string& id) OVERRIDE;
77 virtual void OnNotificationRemoved(const std::string& id, 78 virtual void OnNotificationRemoved(const std::string& id,
78 bool by_user) OVERRIDE; 79 bool by_user) OVERRIDE;
79 virtual void OnNotificationUpdated(const std::string& id) OVERRIDE; 80 virtual void OnNotificationUpdated(const std::string& id) OVERRIDE;
80 81
81 // Overridden from MessageCenterController: 82 // Overridden from MessageCenterController:
82 virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE; 83 virtual void ClickOnNotification(const std::string& notification_id) OVERRIDE;
83 virtual void RemoveNotification(const std::string& notification_id, 84 virtual void RemoveNotification(const std::string& notification_id,
84 bool by_user) OVERRIDE; 85 bool by_user) OVERRIDE;
85 virtual void DisableNotificationsFromThisSource( 86 virtual scoped_ptr<ui::MenuModel> CreateMenuModel(
86 const NotifierId& notifier_id) OVERRIDE; 87 const NotifierId& notifier_id,
87 virtual void ShowNotifierSettingsBubble() OVERRIDE; 88 const base::string16& display_source) OVERRIDE;
88 virtual bool HasClickedListener(const std::string& notification_id) OVERRIDE; 89 virtual bool HasClickedListener(const std::string& notification_id) OVERRIDE;
89 virtual void ClickOnNotificationButton(const std::string& notification_id, 90 virtual void ClickOnNotificationButton(const std::string& notification_id,
90 int button_index) OVERRIDE; 91 int button_index) OVERRIDE;
91 virtual void ExpandNotification(const std::string& notification_id) OVERRIDE; 92 virtual void ExpandNotification(const std::string& notification_id) OVERRIDE;
92 virtual void GroupBodyClicked(const std::string& last_notification_id) 93 virtual void GroupBodyClicked(const std::string& last_notification_id)
93 OVERRIDE; 94 OVERRIDE;
94 virtual void ExpandGroup(const NotifierId& notifier_id) OVERRIDE; 95 virtual void ExpandGroup(const NotifierId& notifier_id) OVERRIDE;
95 virtual void RemoveGroup(const NotifierId& notifier_id) OVERRIDE; 96 virtual void RemoveGroup(const NotifierId& notifier_id) OVERRIDE;
96 97
97 // Overridden from gfx::AnimationDelegate: 98 // Overridden from gfx::AnimationDelegate:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // message center views. 145 // message center views.
145 views::View* source_view_; 146 views::View* source_view_;
146 int source_height_; 147 int source_height_;
147 views::View* target_view_; 148 views::View* target_view_;
148 int target_height_; 149 int target_height_;
149 150
150 // True when the widget is closing so that further operations should be 151 // True when the widget is closing so that further operations should be
151 // ignored. 152 // ignored.
152 bool is_closing_; 153 bool is_closing_;
153 154
155 scoped_ptr<MessageViewContextMenuController> context_menu_controller_;
156
154 DISALLOW_COPY_AND_ASSIGN(MessageCenterView); 157 DISALLOW_COPY_AND_ASSIGN(MessageCenterView);
155 }; 158 };
156 159
157 } // namespace message_center 160 } // namespace message_center
158 161
159 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_ 162 #endif // UI_MESSAGE_CENTER_VIEWS_MESSAGE_CENTER_VIEW_H_
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_controller.h ('k') | ui/message_center/views/message_center_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698