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

Side by Side Diff: chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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/extensions/api/desktop_capture/desktop_capture_api.h" 5 #include "chrome/browser/extensions/api/desktop_capture/desktop_capture_api.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_tab_util.h" 9 #include "chrome/browser/extensions/extension_tab_util.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 26 matching lines...) Expand all
37 37
38 bool DesktopCaptureChooseDesktopMediaFunction::RunAsync() { 38 bool DesktopCaptureChooseDesktopMediaFunction::RunAsync() {
39 EXTENSION_FUNCTION_VALIDATE(args_->GetSize() > 0); 39 EXTENSION_FUNCTION_VALIDATE(args_->GetSize() > 0);
40 40
41 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &request_id_)); 41 EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &request_id_));
42 DesktopCaptureRequestsRegistry::GetInstance()->AddRequest( 42 DesktopCaptureRequestsRegistry::GetInstance()->AddRequest(
43 render_frame_host()->GetProcess()->GetID(), request_id_, this); 43 render_frame_host()->GetProcess()->GetID(), request_id_, this);
44 44
45 args_->Remove(0, NULL); 45 args_->Remove(0, NULL);
46 46
47 scoped_ptr<api::desktop_capture::ChooseDesktopMedia::Params> params = 47 std::unique_ptr<api::desktop_capture::ChooseDesktopMedia::Params> params =
48 api::desktop_capture::ChooseDesktopMedia::Params::Create(*args_); 48 api::desktop_capture::ChooseDesktopMedia::Params::Create(*args_);
49 EXTENSION_FUNCTION_VALIDATE(params.get()); 49 EXTENSION_FUNCTION_VALIDATE(params.get());
50 50
51 // |web_contents| is the WebContents for which the stream is created, and will 51 // |web_contents| is the WebContents for which the stream is created, and will
52 // also be used to determine where to show the picker's UI. 52 // also be used to determine where to show the picker's UI.
53 content::WebContents* web_contents = NULL; 53 content::WebContents* web_contents = NULL;
54 base::string16 target_name; 54 base::string16 target_name;
55 GURL origin; 55 GURL origin;
56 if (params->target_tab) { 56 if (params->target_tab) {
57 if (!params->target_tab->url) { 57 if (!params->target_tab->url) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return Execute(params->sources, web_contents, origin, target_name); 96 return Execute(params->sources, web_contents, origin, target_name);
97 } 97 }
98 98
99 DesktopCaptureCancelChooseDesktopMediaFunction:: 99 DesktopCaptureCancelChooseDesktopMediaFunction::
100 DesktopCaptureCancelChooseDesktopMediaFunction() {} 100 DesktopCaptureCancelChooseDesktopMediaFunction() {}
101 101
102 DesktopCaptureCancelChooseDesktopMediaFunction:: 102 DesktopCaptureCancelChooseDesktopMediaFunction::
103 ~DesktopCaptureCancelChooseDesktopMediaFunction() {} 103 ~DesktopCaptureCancelChooseDesktopMediaFunction() {}
104 104
105 } // namespace extensions 105 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698