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

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

Issue 1286363002: Switch media stream permissions to use IsOriginSecure() instead of SchemeIsSecure(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits. Created 5 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_WEBRTC_BROWSERTEST_BASE_H_ 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ 6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 28 matching lines...) Expand all
39 static const char kFailedWithPermissionDismissedError[]; 39 static const char kFailedWithPermissionDismissedError[];
40 40
41 protected: 41 protected:
42 WebRtcTestBase(); 42 WebRtcTestBase();
43 ~WebRtcTestBase() override; 43 ~WebRtcTestBase() override;
44 44
45 // These all require that the loaded page fulfills the public interface in 45 // These all require that the loaded page fulfills the public interface in
46 // chrome/test/data/webrtc/getusermedia.js. 46 // chrome/test/data/webrtc/getusermedia.js.
47 // If an error is reported back from the getUserMedia call, these functions 47 // If an error is reported back from the getUserMedia call, these functions
48 // will return false. 48 // will return false.
49 // The ...AndAccept()/...AndDeny()/...AndDismiss() functions expect that a
50 // prompt will be shown (i.e. the current origin in the tab_contents doesn't
51 // have a saved permission).
49 bool GetUserMediaAndAccept(content::WebContents* tab_contents) const; 52 bool GetUserMediaAndAccept(content::WebContents* tab_contents) const;
50 bool GetUserMediaWithSpecificConstraintsAndAccept( 53 bool GetUserMediaWithSpecificConstraintsAndAccept(
51 content::WebContents* tab_contents, 54 content::WebContents* tab_contents,
52 const std::string& constraints) const; 55 const std::string& constraints) const;
56 bool GetUserMediaWithSpecificConstraintsAndAcceptIfPrompted(
57 content::WebContents* tab_contents,
58 const std::string& constraints) const;
53 void GetUserMediaAndDeny(content::WebContents* tab_contents); 59 void GetUserMediaAndDeny(content::WebContents* tab_contents);
54 void GetUserMediaWithSpecificConstraintsAndDeny( 60 void GetUserMediaWithSpecificConstraintsAndDeny(
55 content::WebContents* tab_contents, 61 content::WebContents* tab_contents,
56 const std::string& constraints) const; 62 const std::string& constraints) const;
57 void GetUserMediaAndDismiss(content::WebContents* tab_contents) const; 63 void GetUserMediaAndDismiss(content::WebContents* tab_contents) const;
64 void GetUserMediaAndExpectAutoAcceptWithoutPrompt(
65 content::WebContents* tab_contents) const;
66 void GetUserMediaAndExpectAutoDenyWithoutPrompt(
67 content::WebContents* tab_contents) const;
58 void GetUserMedia(content::WebContents* tab_contents, 68 void GetUserMedia(content::WebContents* tab_contents,
59 const std::string& constraints) const; 69 const std::string& constraints) const;
60 70
61 // Convenience method which opens the page at url, calls GetUserMediaAndAccept 71 // Convenience method which opens the page at url, calls GetUserMediaAndAccept
62 // and returns the new tab. 72 // and returns the new tab.
63 content::WebContents* OpenPageAndGetUserMediaInNewTab(const GURL& url) const; 73 content::WebContents* OpenPageAndGetUserMediaInNewTab(const GURL& url) const;
64 74
65 // Convenience method which opens the page at url, calls 75 // Convenience method which opens the page at url, calls
66 // GetUserMediaAndAcceptWithSpecificConstraints and returns the new tab. 76 // GetUserMediaAndAcceptWithSpecificConstraints and returns the new tab.
67 content::WebContents* OpenPageAndGetUserMediaInNewTabWithConstraints( 77 content::WebContents* OpenPageAndGetUserMediaInNewTabWithConstraints(
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 infobars::InfoBar* GetUserMediaAndWaitForInfoBar( 148 infobars::InfoBar* GetUserMediaAndWaitForInfoBar(
139 content::WebContents* tab_contents, 149 content::WebContents* tab_contents,
140 const std::string& constraints) const; 150 const std::string& constraints) const;
141 151
142 bool detect_errors_in_javascript_; 152 bool detect_errors_in_javascript_;
143 153
144 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase); 154 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase);
145 }; 155 };
146 156
147 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ 157 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/media_stream_infobar_delegate.cc ('k') | chrome/browser/media/webrtc_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698