NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / media_picker / desktop_media_picker_cocoa.mm
blob44ca3aa5fcff12ec5386d2aa90706095fbd3cc67
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                                    scoped_ptr<DesktopMediaList> media_list,
19                                    const DoneCallback& done_callback) {
20   controller_.reset(
21       [[DesktopMediaPickerController alloc] initWithMediaList:media_list.Pass()
22                                                        parent:parent
23                                                      callback:done_callback
24                                                       appName:app_name]);
25   [controller_ showWindow:nil];
28 // static
29 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
30   return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerCocoa());