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

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: 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 // These determine whether all audio (or video) devices (i.e., those returned
45 // by GetAudioDevices() and GetVideoDevices()) can be auto-accepted in the
46 // future should the user accept them this time.
47 bool IsSafeToAlwaysAllowAudio() const;
48 bool IsSafeToAlwaysAllowVideo() const;
44 49
45 // Callbacks to handle accepting devices or denying the request. |audio_id| 50 // Callbacks to handle accepting devices or denying the request. |audio_id|
46 // and |video_id| are the device IDs of the accepted audio and video devices. 51 // and |video_id| are the device IDs of the accepted audio and video devices.
47 // |always_allow| is true if the "always allow" option is checked. 52 // |always_allow| is true if the "always allow" option is checked.
48 // The |audio_id| or |video_id| values are ignored if the request did not ask 53 // The |audio_id| or |video_id| values are ignored if the request did not ask
49 // for audio or video devices respectively. 54 // for audio or video devices respectively.
50 void Accept(const std::string& audio_id, 55 void Accept(const std::string& audio_id,
51 const std::string& video_id, 56 const std::string& video_id,
52 bool always_allow); 57 bool always_allow);
53 void Deny(); 58 void Deny();
54 59
55 private: 60 private:
56 // InfoBarDelegate: 61 // InfoBarDelegate:
57 virtual InfoBar* CreateInfoBar(InfoBarService* owner) OVERRIDE; 62 virtual InfoBar* CreateInfoBar(InfoBarService* owner) OVERRIDE;
58 virtual void InfoBarDismissed() OVERRIDE; 63 virtual void InfoBarDismissed() OVERRIDE;
59 virtual gfx::Image* GetIcon() const OVERRIDE; 64 virtual gfx::Image* GetIcon() const OVERRIDE;
60 virtual Type GetInfoBarType() const OVERRIDE; 65 virtual Type GetInfoBarType() const OVERRIDE;
61 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate() OVERRIDE; 66 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate() OVERRIDE;
62 67
63 68
64 private: 69 private:
65 scoped_ptr<MediaStreamDevicesController> controller_; 70 scoped_ptr<MediaStreamDevicesController> controller_;
66 71
67 DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegate); 72 DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegate);
68 }; 73 };
69 74
70 #endif // CHROME_BROWSER_UI_MEDIA_STREAM_INFOBAR_DELEGATE_H_ 75 #endif // CHROME_BROWSER_UI_MEDIA_STREAM_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698