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

Side by Side Diff: ui/message_center/views/toast_contents_view.cc

Issue 855023003: Add presubmit check for scoped_ptr usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 11 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) 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/views/toast_contents_view.h" 5 #include "ui/message_center/views/toast_contents_view.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 if (collection_) 300 if (collection_)
301 collection_->RemoveNotification(notification_id, by_user); 301 collection_->RemoveNotification(notification_id, by_user);
302 } 302 }
303 303
304 scoped_ptr<ui::MenuModel> ToastContentsView::CreateMenuModel( 304 scoped_ptr<ui::MenuModel> ToastContentsView::CreateMenuModel(
305 const NotifierId& notifier_id, 305 const NotifierId& notifier_id,
306 const base::string16& display_source) { 306 const base::string16& display_source) {
307 // Should not reach, the context menu should be handled in 307 // Should not reach, the context menu should be handled in
308 // MessagePopupCollection. 308 // MessagePopupCollection.
309 NOTREACHED(); 309 NOTREACHED();
310 return scoped_ptr<ui::MenuModel>(); 310 return nullptr;
311 } 311 }
312 312
313 bool ToastContentsView::HasClickedListener( 313 bool ToastContentsView::HasClickedListener(
314 const std::string& notification_id) { 314 const std::string& notification_id) {
315 if (!collection_) 315 if (!collection_)
316 return false; 316 return false;
317 return collection_->HasClickedListener(notification_id); 317 return collection_->HasClickedListener(notification_id);
318 } 318 }
319 319
320 void ToastContentsView::ClickOnNotificationButton( 320 void ToastContentsView::ClickOnNotificationButton(
(...skipping 25 matching lines...) Expand all
346 } 346 }
347 347
348 gfx::Rect ToastContentsView::GetClosedToastBounds(gfx::Rect bounds) { 348 gfx::Rect ToastContentsView::GetClosedToastBounds(gfx::Rect bounds) {
349 return gfx::Rect(bounds.x() + bounds.width() - kClosedToastWidth, 349 return gfx::Rect(bounds.x() + bounds.width() - kClosedToastWidth,
350 bounds.y(), 350 bounds.y(),
351 kClosedToastWidth, 351 kClosedToastWidth,
352 bounds.height()); 352 bounds.height());
353 } 353 }
354 354
355 } // namespace message_center 355 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/notifier_settings_view.cc ('k') | ui/ozone/platform/caca/caca_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698