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

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

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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
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 <memory>
9
8 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
9 #include "ash/system/tray/tray_background_view.h" 11 #include "ash/system/tray/tray_background_view.h"
10 #include "ash/system/user/login_status.h" 12 #include "ash/system/user/login_status.h"
11 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
15 #include "ui/base/models/simple_menu_model.h" 16 #include "ui/base/models/simple_menu_model.h"
16 #include "ui/message_center/message_center_tray.h" 17 #include "ui/message_center/message_center_tray.h"
17 #include "ui/message_center/message_center_tray_delegate.h" 18 #include "ui/message_center/message_center_tray_delegate.h"
18 #include "ui/views/bubble/tray_bubble_view.h" 19 #include "ui/views/bubble/tray_bubble_view.h"
19 #include "ui/views/controls/button/button.h" 20 #include "ui/views/controls/button/button.h"
20 21
21 // Status area tray for showing browser and app notifications. This hosts 22 // Status area tray for showing browser and app notifications. This hosts
22 // a MessageCenter class which manages the notification list. This class 23 // a MessageCenter class which manages the notification list. This class
23 // contains the Ash specific tray implementation. 24 // contains the Ash specific tray implementation.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 ui::MenuModel* CreateQuietModeMenu(); 151 ui::MenuModel* CreateQuietModeMenu();
151 152
152 WebNotificationBubbleWrapper* message_center_bubble() const { 153 WebNotificationBubbleWrapper* message_center_bubble() const {
153 return message_center_bubble_.get(); 154 return message_center_bubble_.get();
154 } 155 }
155 156
156 // Testing accessors. 157 // Testing accessors.
157 bool IsPopupVisible() const; 158 bool IsPopupVisible() const;
158 message_center::MessageCenterBubble* GetMessageCenterBubbleForTest(); 159 message_center::MessageCenterBubble* GetMessageCenterBubbleForTest();
159 160
160 scoped_ptr<message_center::MessageCenterTray> message_center_tray_; 161 std::unique_ptr<message_center::MessageCenterTray> message_center_tray_;
161 scoped_ptr<WebNotificationBubbleWrapper> message_center_bubble_; 162 std::unique_ptr<WebNotificationBubbleWrapper> message_center_bubble_;
162 scoped_ptr<message_center::MessagePopupCollection> popup_collection_; 163 std::unique_ptr<message_center::MessagePopupCollection> popup_collection_;
163 WebNotificationButton* button_; 164 WebNotificationButton* button_;
164 165
165 bool show_message_center_on_unlock_; 166 bool show_message_center_on_unlock_;
166 167
167 bool should_update_tray_content_; 168 bool should_update_tray_content_;
168 169
169 // True when the shelf auto hide behavior has to be blocked. Previously 170 // True when the shelf auto hide behavior has to be blocked. Previously
170 // this was done by checking |message_center_bubble_| but actually 171 // this was done by checking |message_center_bubble_| but actually
171 // the check can be called when creating this object, so it would cause 172 // the check can be called when creating this object, so it would cause
172 // flickers of the shelf from hidden to shown. See: crbug.com/181213 173 // flickers of the shelf from hidden to shown. See: crbug.com/181213
173 bool should_block_shelf_auto_hide_; 174 bool should_block_shelf_auto_hide_;
174 175
175 scoped_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_; 176 std::unique_ptr<AshPopupAlignmentDelegate> popup_alignment_delegate_;
176 177
177 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); 178 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray);
178 }; 179 };
179 180
180 } // namespace ash 181 } // namespace ash
181 182
182 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_ 183 #endif // ASH_SYSTEM_WEB_NOTIFICATION_WEB_NOTIFICATION_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698