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

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

Issue 20247003: Introduced base class for WebRTC browser tests, cleaned up duplication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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_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
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_
OLDNEW
« no previous file with comments | « chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc ('k') | chrome/browser/media/webrtc_browsertest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698