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

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

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 #include "ash/system/web_notification/web_notification_tray.h" 5 #include "ash/system/web_notification/web_notification_tray.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_layout_manager_observer.h" 10 #include "ash/shelf/shelf_layout_manager_observer.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 bubble_view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE); 96 bubble_view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
97 bubble->InitializeContents(bubble_view); 97 bubble->InitializeContents(bubble_view);
98 } 98 }
99 99
100 message_center::MessageBubbleBase* bubble() const { return bubble_.get(); } 100 message_center::MessageBubbleBase* bubble() const { return bubble_.get(); }
101 101
102 // Convenience accessors. 102 // Convenience accessors.
103 views::TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); } 103 views::TrayBubbleView* bubble_view() const { return bubble_->bubble_view(); }
104 104
105 private: 105 private:
106 scoped_ptr<message_center::MessageBubbleBase> bubble_; 106 std::unique_ptr<message_center::MessageBubbleBase> bubble_;
107 scoped_ptr<TrayBubbleWrapper> bubble_wrapper_; 107 std::unique_ptr<TrayBubbleWrapper> bubble_wrapper_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(WebNotificationBubbleWrapper); 109 DISALLOW_COPY_AND_ASSIGN(WebNotificationBubbleWrapper);
110 }; 110 };
111 111
112 class WebNotificationButton : public views::CustomButton { 112 class WebNotificationButton : public views::CustomButton {
113 public: 113 public:
114 WebNotificationButton(views::ButtonListener* listener) 114 WebNotificationButton(views::ButtonListener* listener)
115 : views::CustomButton(listener), 115 : views::CustomButton(listener),
116 is_bubble_visible_(false), 116 is_bubble_visible_(false),
117 unread_count_(0) { 117 unread_count_(0) {
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 message_center::MessageCenterBubble* 489 message_center::MessageCenterBubble*
490 WebNotificationTray::GetMessageCenterBubbleForTest() { 490 WebNotificationTray::GetMessageCenterBubbleForTest() {
491 if (!message_center_bubble()) 491 if (!message_center_bubble())
492 return NULL; 492 return NULL;
493 return static_cast<message_center::MessageCenterBubble*>( 493 return static_cast<message_center::MessageCenterBubble*>(
494 message_center_bubble()->bubble()); 494 message_center_bubble()->bubble());
495 } 495 }
496 496
497 } // namespace ash 497 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | ash/system/web_notification/web_notification_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698