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

Side by Side Diff: chrome/browser/ui/views/screen_capture_notification_ui_views.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/screen_capture_notification_ui.h" 5 #include "chrome/browser/ui/screen_capture_notification_ui.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/app/chrome_dll_resource.h" 9 #include "chrome/app/chrome_dll_resource.h"
10 #include "chrome/browser/ui/views/chrome_views_export.h" 10 #include "chrome/browser/ui/views/chrome_views_export.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 278 }
279 279
280 views::NonClientFrameView* 280 views::NonClientFrameView*
281 ScreenCaptureNotificationUIViews::CreateNonClientFrameView( 281 ScreenCaptureNotificationUIViews::CreateNonClientFrameView(
282 views::Widget* widget) { 282 views::Widget* widget) {
283 views::BubbleFrameView* frame = new views::BubbleFrameView( 283 views::BubbleFrameView* frame = new views::BubbleFrameView(
284 gfx::Insets(), gfx::Insets(kPaddingVertical, kPaddingHorizontal, 284 gfx::Insets(), gfx::Insets(kPaddingVertical, kPaddingHorizontal,
285 kPaddingVertical, kPaddingHorizontal)); 285 kPaddingVertical, kPaddingHorizontal));
286 SkColor color = widget->GetNativeTheme()->GetSystemColor( 286 SkColor color = widget->GetNativeTheme()->GetSystemColor(
287 ui::NativeTheme::kColorId_DialogBackground); 287 ui::NativeTheme::kColorId_DialogBackground);
288 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( 288 frame->SetBubbleBorder(std::unique_ptr<views::BubbleBorder>(
289 new views::BubbleBorder(views::BubbleBorder::NONE, 289 new views::BubbleBorder(views::BubbleBorder::NONE,
290 views::BubbleBorder::SMALL_SHADOW, 290 views::BubbleBorder::SMALL_SHADOW, color)));
291 color)));
292 return frame; 291 return frame;
293 } 292 }
294 293
295 base::string16 ScreenCaptureNotificationUIViews::GetWindowTitle() const { 294 base::string16 ScreenCaptureNotificationUIViews::GetWindowTitle() const {
296 return text_; 295 return text_;
297 } 296 }
298 297
299 bool ScreenCaptureNotificationUIViews::ShouldShowWindowTitle() const { 298 bool ScreenCaptureNotificationUIViews::ShouldShowWindowTitle() const {
300 return false; 299 return false;
301 } 300 }
(...skipping 22 matching lines...) Expand all
324 void ScreenCaptureNotificationUIViews::NotifyStopped() { 323 void ScreenCaptureNotificationUIViews::NotifyStopped() {
325 if (!stop_callback_.is_null()) { 324 if (!stop_callback_.is_null()) {
326 base::Closure callback = stop_callback_; 325 base::Closure callback = stop_callback_;
327 stop_callback_.Reset(); 326 stop_callback_.Reset();
328 callback.Run(); 327 callback.Run();
329 } 328 }
330 } 329 }
331 330
332 } // namespace 331 } // namespace
333 332
334 scoped_ptr<ScreenCaptureNotificationUI> ScreenCaptureNotificationUI::Create( 333 std::unique_ptr<ScreenCaptureNotificationUI>
335 const base::string16& text) { 334 ScreenCaptureNotificationUI::Create(const base::string16& text) {
336 return scoped_ptr<ScreenCaptureNotificationUI>( 335 return std::unique_ptr<ScreenCaptureNotificationUI>(
337 new ScreenCaptureNotificationUIViews(text)); 336 new ScreenCaptureNotificationUIViews(text));
338 } 337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698