Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / media_picker / desktop_media_picker_cocoa.mm
blob8708f3ab246951269980c5e38414b55b60b05ce5
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) {
22   controller_.reset(
23       [[DesktopMediaPickerController alloc] initWithMediaList:media_list.Pass()
24                                                        parent:parent
25                                                      callback:done_callback
26                                                       appName:app_name
27                                                    targetName:target_name]);
28   [controller_ showWindow:nil];
31 // static
32 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
33   return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerCocoa());