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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_cocoa.h"
7 #import "chrome/browser/ui/cocoa/media_picker/desktop_media_picker_controller.h"
9 DesktopMediaPickerCocoa::DesktopMediaPickerCocoa() {
12 DesktopMediaPickerCocoa::~DesktopMediaPickerCocoa() {
15 void DesktopMediaPickerCocoa::Show(content::WebContents* web_contents,
16 gfx::NativeWindow context,
17 gfx::NativeWindow parent,
18 const base::string16& app_name,
19 const base::string16& target_name,
20 scoped_ptr<DesktopMediaList> media_list,
21 const DoneCallback& done_callback) {
23 [[DesktopMediaPickerController alloc] initWithMediaList:media_list.Pass()
25 callback:done_callback
27 targetName:target_name]);
28 [controller_ showWindow:nil];
32 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
33 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerCocoa());