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(gfx::NativeWindow context,
16 gfx::NativeWindow parent,
17 const base::string16& app_name,
18 const base::string16& target_name,
19 scoped_ptr<DesktopMediaList> media_list,
20 const DoneCallback& done_callback) {
22 [[DesktopMediaPickerController alloc] initWithMediaList:media_list.Pass()
24 callback:done_callback
26 targetName:target_name]);
27 [controller_ showWindow:nil];
31 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
32 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerCocoa());