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

Side by Side Diff: chrome/browser/media/desktop_media_picker.h

Issue 281383008: Made desktop capture screen tab-constrained in ASH (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_
6 #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_ 6 #define CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
12 #include "content/public/browser/desktop_media_id.h" 12 #include "content/public/browser/desktop_media_id.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 14
15 class DesktopMediaList; 15 class DesktopMediaList;
16 16
17 namespace content {
18 class WebContents;
19 }
20
17 // Abstract interface for desktop media picker UI. It's used by Desktop Media 21 // Abstract interface for desktop media picker UI. It's used by Desktop Media
18 // API to let user choose a desktop media source. 22 // API to let user choose a desktop media source.
19 class DesktopMediaPicker { 23 class DesktopMediaPicker {
20 public: 24 public:
21 typedef base::Callback<void(content::DesktopMediaID)> DoneCallback; 25 typedef base::Callback<void(content::DesktopMediaID)> DoneCallback;
22 26
23 // Creates default implementation of DesktopMediaPicker for the current 27 // Creates default implementation of DesktopMediaPicker for the current
24 // platform. 28 // platform.
25 static scoped_ptr<DesktopMediaPicker> Create(); 29 static scoped_ptr<DesktopMediaPicker> Create();
26 30
27 DesktopMediaPicker() {} 31 DesktopMediaPicker() {}
28 virtual ~DesktopMediaPicker() {} 32 virtual ~DesktopMediaPicker() {}
29 33
30 // Shows dialog with list of desktop media sources (screens, windows, tabs) 34 // Shows dialog with list of desktop media sources (screens, windows, tabs)
31 // provided by |list| and calls |done_callback| when user chooses one of the 35 // provided by |list| and calls |done_callback| when user chooses one of the
32 // sources or closes the dialog. 36 // sources or closes the dialog.
33 virtual void Show(gfx::NativeWindow context, 37 virtual void Show(content::WebContents* web_contents,
38 gfx::NativeWindow context,
34 gfx::NativeWindow parent, 39 gfx::NativeWindow parent,
35 const base::string16& app_name, 40 const base::string16& app_name,
36 const base::string16& target_name, 41 const base::string16& target_name,
37 scoped_ptr<DesktopMediaList> list, 42 scoped_ptr<DesktopMediaList> list,
38 const DoneCallback& done_callback) = 0; 43 const DoneCallback& done_callback) = 0;
39 44
40 private: 45 private:
41 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPicker); 46 DISALLOW_COPY_AND_ASSIGN(DesktopMediaPicker);
42 }; 47 };
43 48
44 #endif // CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_ 49 #endif // CHROME_BROWSER_MEDIA_DESKTOP_MEDIA_PICKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698