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

Side by Side Diff: chrome/browser/ui/media_stream_infobar_delegate.h

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 8 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_MEDIA_STREAM_INFOBAR_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_MEDIA_STREAM_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_UI_MEDIA_STREAM_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_MEDIA_STREAM_INFOBAR_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 21 matching lines...) Expand all
32 bool HasAudio() const; 32 bool HasAudio() const;
33 bool HasVideo() const; 33 bool HasVideo() const;
34 34
35 // Returns lists of audio and/or video devices from which the user will have 35 // Returns lists of audio and/or video devices from which the user will have
36 // to choose. 36 // to choose.
37 content::MediaStreamDevices GetAudioDevices() const; 37 content::MediaStreamDevices GetAudioDevices() const;
38 content::MediaStreamDevices GetVideoDevices() const; 38 content::MediaStreamDevices GetVideoDevices() const;
39 39
40 // Returns the security origin (e.g. "www.html5rocks.com") at the origin 40 // Returns the security origin (e.g. "www.html5rocks.com") at the origin
41 // of this request. 41 // of this request.
42 const GURL& GetSecurityOrigin() const; 42 const std::string& GetSecurityOriginSpec() const;
43 43
44 void set_selected_audio_device(const std::string& device_id) { 44 void set_selected_audio_device(const std::string& device_id) {
45 selected_audio_device_ = device_id; 45 selected_audio_device_ = device_id;
46 } 46 }
47 void set_selected_video_device(const std::string& device_id) { 47 void set_selected_video_device(const std::string& device_id) {
48 selected_video_device_ = device_id; 48 selected_video_device_ = device_id;
49 } 49 }
50 void toggle_always_allow() { always_allow_ = !always_allow_; } 50 void toggle_always_allow() { always_allow_ = !always_allow_; }
51 51
52 const std::string& selected_audio_device() const { 52 const std::string& selected_audio_device() const {
53 return selected_audio_device_; 53 return selected_audio_device_;
54 } 54 }
55 const std::string& selected_video_device() const { 55 const std::string& selected_video_device() const {
56 return selected_video_device_; 56 return selected_video_device_;
57 } 57 }
58 bool always_allow() const { return always_allow_; } 58 bool always_allow() const { return always_allow_; }
59 59
60 // These determine whether all audio (or video) devices can be auto-accepted
61 // in the future should the user accept them this time.
62 bool IsSafeToAlwaysAllowAudio() const;
63 bool IsSafeToAlwaysAllowVideo() const;
64
60 // Callbacks to handle accepting devices or denying the request. 65 // Callbacks to handle accepting devices or denying the request.
61 void Accept(); 66 void Accept();
62 void Deny(); 67 void Deny();
63 68
64 private: 69 private:
65 // InfoBarDelegate: 70 // InfoBarDelegate:
66 virtual InfoBar* CreateInfoBar(InfoBarService* owner) OVERRIDE; 71 virtual InfoBar* CreateInfoBar(InfoBarService* owner) OVERRIDE;
67 virtual void InfoBarDismissed() OVERRIDE; 72 virtual void InfoBarDismissed() OVERRIDE;
68 virtual gfx::Image* GetIcon() const OVERRIDE; 73 virtual gfx::Image* GetIcon() const OVERRIDE;
69 virtual Type GetInfoBarType() const OVERRIDE; 74 virtual Type GetInfoBarType() const OVERRIDE;
70 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate() OVERRIDE; 75 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate() OVERRIDE;
71 76
72 77
73 private: 78 private:
74 scoped_ptr<MediaStreamDevicesController> controller_; 79 scoped_ptr<MediaStreamDevicesController> controller_;
75 80
76 std::string selected_audio_device_; 81 std::string selected_audio_device_;
77 std::string selected_video_device_; 82 std::string selected_video_device_;
78 bool always_allow_; 83 bool always_allow_;
79 84
80 DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegate); 85 DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegate);
81 }; 86 };
82 87
83 #endif // CHROME_BROWSER_UI_MEDIA_STREAM_INFOBAR_DELEGATE_H_ 88 #endif // CHROME_BROWSER_UI_MEDIA_STREAM_INFOBAR_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/infobars/media_stream_infobar_gtk.cc ('k') | chrome/browser/ui/media_stream_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698