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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 562263002: Check media permissions through RenderFrameHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render_frame_get_sources
Patch Set: Rebase Created 6 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/media_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1752 fullscreen_controller_->LostMouseLock(); 1752 fullscreen_controller_->LostMouseLock();
1753 } 1753 }
1754 1754
1755 void Browser::RequestMediaAccessPermission( 1755 void Browser::RequestMediaAccessPermission(
1756 content::WebContents* web_contents, 1756 content::WebContents* web_contents,
1757 const content::MediaStreamRequest& request, 1757 const content::MediaStreamRequest& request,
1758 const content::MediaResponseCallback& callback) { 1758 const content::MediaResponseCallback& callback) {
1759 ::RequestMediaAccessPermission(web_contents, profile_, request, callback); 1759 ::RequestMediaAccessPermission(web_contents, profile_, request, callback);
1760 } 1760 }
1761 1761
1762 bool Browser::CheckMediaAccessPermission(content::WebContents* web_contents,
1763 const GURL& security_origin,
1764 content::MediaStreamType type) {
1765 return ::CheckMediaAccessPermission(web_contents, security_origin, type);
1766 }
1767
1762 bool Browser::RequestPpapiBrokerPermission( 1768 bool Browser::RequestPpapiBrokerPermission(
1763 WebContents* web_contents, 1769 WebContents* web_contents,
1764 const GURL& url, 1770 const GURL& url,
1765 const base::FilePath& plugin_path, 1771 const base::FilePath& plugin_path,
1766 const base::Callback<void(bool)>& callback) { 1772 const base::Callback<void(bool)>& callback) {
1767 PepperBrokerInfoBarDelegate::Create(web_contents, url, plugin_path, callback); 1773 PepperBrokerInfoBarDelegate::Create(web_contents, url, plugin_path, callback);
1768 return true; 1774 return true;
1769 } 1775 }
1770 1776
1771 gfx::Size Browser::GetSizeForNewRenderView(WebContents* web_contents) const { 1777 gfx::Size Browser::GetSizeForNewRenderView(WebContents* web_contents) const {
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 if (contents && !allow_js_access) { 2477 if (contents && !allow_js_access) {
2472 contents->web_contents()->GetController().LoadURL( 2478 contents->web_contents()->GetController().LoadURL(
2473 target_url, 2479 target_url,
2474 content::Referrer(), 2480 content::Referrer(),
2475 content::PAGE_TRANSITION_LINK, 2481 content::PAGE_TRANSITION_LINK,
2476 std::string()); // No extra headers. 2482 std::string()); // No extra headers.
2477 } 2483 }
2478 2484
2479 return contents != NULL; 2485 return contents != NULL;
2480 } 2486 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/media_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698