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

Side by Side Diff: ui/message_center/message_center_tray.cc

Issue 922923002: ui: Cleanup the usage of scoped_ptr throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 10 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
« no previous file with comments | « ui/gl/gl_context.cc ('k') | ui/native_theme/common_theme.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) 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 #include "ui/message_center/message_center_tray.h" 5 #include "ui/message_center/message_center_tray.h"
6 6
7 #include "base/observer_list.h" 7 #include "base/observer_list.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/models/simple_menu_model.h" 10 #include "ui/base/models/simple_menu_model.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 message_center_visible_ = delegate_->ShowNotifierSettings(); 192 message_center_visible_ = delegate_->ShowNotifierSettings();
193 message_center_->SetVisibility(message_center::VISIBILITY_SETTINGS); 193 message_center_->SetVisibility(message_center::VISIBILITY_SETTINGS);
194 194
195 NotifyMessageCenterTrayChanged(); 195 NotifyMessageCenterTrayChanged();
196 } 196 }
197 197
198 scoped_ptr<ui::MenuModel> MessageCenterTray::CreateNotificationMenuModel( 198 scoped_ptr<ui::MenuModel> MessageCenterTray::CreateNotificationMenuModel(
199 const NotifierId& notifier_id, 199 const NotifierId& notifier_id,
200 const base::string16& display_source) { 200 const base::string16& display_source) {
201 return scoped_ptr<ui::MenuModel>(new NotificationMenuModel( 201 return make_scoped_ptr(
202 this, notifier_id, display_source)); 202 new NotificationMenuModel(this, notifier_id, display_source));
203 } 203 }
204 204
205 void MessageCenterTray::OnNotificationAdded( 205 void MessageCenterTray::OnNotificationAdded(
206 const std::string& notification_id) { 206 const std::string& notification_id) {
207 OnMessageCenterChanged(); 207 OnMessageCenterChanged();
208 } 208 }
209 209
210 void MessageCenterTray::OnNotificationRemoved( 210 void MessageCenterTray::OnNotificationRemoved(
211 const std::string& notification_id, 211 const std::string& notification_id,
212 bool by_user) { 212 bool by_user) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 ShowPopupBubble(); 255 ShowPopupBubble();
256 256
257 NotifyMessageCenterTrayChanged(); 257 NotifyMessageCenterTrayChanged();
258 } 258 }
259 259
260 void MessageCenterTray::NotifyMessageCenterTrayChanged() { 260 void MessageCenterTray::NotifyMessageCenterTrayChanged() {
261 delegate_->OnMessageCenterTrayChanged(); 261 delegate_->OnMessageCenterTrayChanged();
262 } 262 }
263 263
264 } // namespace message_center 264 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/gl/gl_context.cc ('k') | ui/native_theme/common_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698