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

Side by Side Diff: chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.mm

Issue 1880693002: Desktop Capture Picker New UI: Preliminary Refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit 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/cocoa/media_picker/desktop_media_picker_cocoa.h" 5 #include "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #import "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h" 9 #import "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h"
10 10
11 DesktopMediaPickerCocoa::DesktopMediaPickerCocoa() { 11 DesktopMediaPickerCocoa::DesktopMediaPickerCocoa() {
12 } 12 }
13 13
14 DesktopMediaPickerCocoa::~DesktopMediaPickerCocoa() { 14 DesktopMediaPickerCocoa::~DesktopMediaPickerCocoa() {
15 } 15 }
16 16
17 void DesktopMediaPickerCocoa::Show(content::WebContents* web_contents, 17 void DesktopMediaPickerCocoa::Show(
18 gfx::NativeWindow context, 18 content::WebContents* web_contents,
19 gfx::NativeWindow parent, 19 gfx::NativeWindow context,
20 const base::string16& app_name, 20 gfx::NativeWindow parent,
21 const base::string16& target_name, 21 const base::string16& app_name,
22 std::unique_ptr<DesktopMediaList> media_list, 22 const base::string16& target_name,
23 bool request_audio, 23 std::unique_ptr<DesktopMediaList> screen_list,
24 const DoneCallback& done_callback) { 24 std::unique_ptr<DesktopMediaList> window_list,
25 std::unique_ptr<DesktopMediaList> tab_list,
26 bool request_audio,
27 const DoneCallback& done_callback) {
25 controller_.reset([[DesktopMediaPickerController alloc] 28 controller_.reset([[DesktopMediaPickerController alloc]
26 initWithMediaList:std::move(media_list) 29 initWithScreenList:std::move(screen_list)
27 parent:parent 30 windowList:std::move(window_list)
28 callback:done_callback 31 tabList:std::move(tab_list)
29 appName:app_name 32 parent:parent
30 targetName:target_name 33 callback:done_callback
31 requestAudio:request_audio]); 34 appName:app_name
35 targetName:target_name
36 requestAudio:request_audio]);
32 [controller_ showWindow:nil]; 37 [controller_ showWindow:nil];
33 } 38 }
34 39
35 // static 40 // static
36 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { 41 std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
37 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerCocoa()); 42 return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerCocoa());
38 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698