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 13 matching lines...) Expand all Loading... |
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 delegate, then | 25 // involves prompting the user, creates a media stream infobar delegate, then |
26 // checks for an existing infobar for |web_contents| and replaces it if found, | 26 // checks for an existing infobar for |web_contents| and replaces it if found, |
27 // or just adds the new infobar otherwise. Returns whether an infobar was | 27 // or just adds the new infobar otherwise. Returns whether an infobar was |
28 // created. | 28 // 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 private: | 33 private: |
34 friend class MediaStreamInfobarTest; | 34 friend class WebRtcTestBase; |
35 friend class WebrtcBrowserTest; | |
36 friend class WebrtcVideoQualityBrowserTest; | |
37 | 35 |
38 MediaStreamInfoBarDelegate( | 36 MediaStreamInfoBarDelegate( |
39 InfoBarService* infobar_service, | 37 InfoBarService* infobar_service, |
40 scoped_ptr<MediaStreamDevicesController> controller); | 38 scoped_ptr<MediaStreamDevicesController> controller); |
41 | 39 |
42 // ConfirmInfoBarDelegate: | 40 // ConfirmInfoBarDelegate: |
43 virtual void InfoBarDismissed() OVERRIDE; | 41 virtual void InfoBarDismissed() OVERRIDE; |
44 virtual int GetIconID() const OVERRIDE; | 42 virtual int GetIconID() const OVERRIDE; |
45 virtual Type GetInfoBarType() const OVERRIDE; | 43 virtual Type GetInfoBarType() const OVERRIDE; |
46 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate() OVERRIDE; | 44 virtual MediaStreamInfoBarDelegate* AsMediaStreamInfoBarDelegate() OVERRIDE; |
47 virtual string16 GetMessageText() const OVERRIDE; | 45 virtual string16 GetMessageText() const OVERRIDE; |
48 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 46 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
49 virtual bool Accept() OVERRIDE; | 47 virtual bool Accept() OVERRIDE; |
50 virtual bool Cancel() OVERRIDE; | 48 virtual bool Cancel() OVERRIDE; |
51 virtual string16 GetLinkText() const OVERRIDE; | 49 virtual string16 GetLinkText() const OVERRIDE; |
52 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; | 50 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE; |
53 | 51 |
54 scoped_ptr<MediaStreamDevicesController> controller_; | 52 scoped_ptr<MediaStreamDevicesController> controller_; |
55 | 53 |
56 DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegate); | 54 DISALLOW_COPY_AND_ASSIGN(MediaStreamInfoBarDelegate); |
57 }; | 55 }; |
58 | 56 |
59 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_INFOBAR_DELEGATE_H_ | 57 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_INFOBAR_DELEGATE_H_ |
OLD | NEW |