OLD | NEW |
---|---|
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_MEDIA_MEDIA_STREAM_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_MEDIA_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 12 matching lines...) Expand all Loading... | |
23 | 23 |
24 // Handles a permission request (in |request|) for |web_contents|. If this | 24 // Handles a permission request (in |request|) for |web_contents|. If this |
25 // involves prompting the user, creates a media stream infobar and delegate, | 25 // involves prompting the user, creates a media stream infobar and delegate, |
26 // then checks for an existing infobar for |web_contents| and replaces it if | 26 // then checks for an existing infobar for |web_contents| and replaces it if |
27 // found, or just adds the new infobar otherwise. Returns whether an infobar | 27 // found, or just adds the new infobar otherwise. Returns whether an infobar |
28 // was created. | 28 // was created. |
29 static bool Create(content::WebContents* web_contents, | 29 static bool Create(content::WebContents* web_contents, |
30 const content::MediaStreamRequest& request, | 30 const content::MediaStreamRequest& request, |
31 const content::MediaResponseCallback& callback); | 31 const content::MediaResponseCallback& callback); |
32 | 32 |
33 bool IsRequestingVideoAccess(); | |
Peter Kasting
2015/06/04 07:08:13
Nit: Can these be const?
Ted C
2015/06/05 00:57:57
Done.
| |
34 bool IsRequestingMicrophoneAccess(); | |
35 | |
33 private: | 36 private: |
34 friend class WebRtcTestBase; | 37 friend class WebRtcTestBase; |
35 | 38 |
36 explicit MediaStreamInfoBarDelegate( | 39 explicit MediaStreamInfoBarDelegate( |
37 scoped_ptr<MediaStreamDevicesController> controller); | 40 scoped_ptr<MediaStreamDevicesController> controller); |
38 | 41 |
39 // ConfirmInfoBarDelegate: | 42 // ConfirmInfoBarDelegate: |
40 Type GetInfoBarType() const override; | 43 Type GetInfoBarType() const override; |
41 int GetIconID() const override; | 44 int GetIconID() const override; |
42 void InfoBarDismissed() override; | 45 void InfoBarDismissed() override; |
43 MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate() override; | 46 MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate() override; |
44 base::string16 GetMessageText() const override; | 47 base::string16 GetMessageText() const override; |
45 base::string16 GetButtonLabel(InfoBarButton button) const override; | 48 base::string16 GetButtonLabel(InfoBarButton button) const override; |
46 bool Accept() override; | 49 bool Accept() override; |
47 bool Cancel() override; | 50 bool Cancel() override; |
48 base::string16 GetLinkText() const override; | 51 base::string16 GetLinkText() const override; |
49 bool LinkClicked(WindowOpenDisposition disposition) override; | 52 bool LinkClicked(WindowOpenDisposition disposition) override; |
50 | 53 |
51 scoped_ptr<MediaStreamDevicesController> controller_; | 54 scoped_ptr<MediaStreamDevicesController> controller_; |
52 | 55 |
53 DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegate); | 56 DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegate); |
54 }; | 57 }; |
55 | 58 |
56 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_INFOBAR_DELEGATE_H_ | 59 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_INFOBAR_DELEGATE_H_ |
OLD | NEW |