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

Side by Side Diff: extensions/browser/extension_host.cc

Issue 562263002: Check media permissions through RenderFrameHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render_frame_get_sources
Patch Set: git cl format. Don't blame me. 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/extension_host.h" 5 #include "extensions/browser/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } 421 }
422 422
423 void ExtensionHost::RequestMediaAccessPermission( 423 void ExtensionHost::RequestMediaAccessPermission(
424 content::WebContents* web_contents, 424 content::WebContents* web_contents,
425 const content::MediaStreamRequest& request, 425 const content::MediaStreamRequest& request,
426 const content::MediaResponseCallback& callback) { 426 const content::MediaResponseCallback& callback) {
427 delegate_->ProcessMediaAccessRequest( 427 delegate_->ProcessMediaAccessRequest(
428 web_contents, request, callback, extension()); 428 web_contents, request, callback, extension());
429 } 429 }
430 430
431 bool ExtensionHost::CheckMediaAccessPermission(
432 content::WebContents* web_contents,
433 const GURL& security_origin,
434 content::MediaStreamType type) {
435 return delegate_->CheckMediaAccessPermission(
436 web_contents, security_origin, type, extension());
437 }
438
431 bool ExtensionHost::IsNeverVisible(content::WebContents* web_contents) { 439 bool ExtensionHost::IsNeverVisible(content::WebContents* web_contents) {
432 ViewType view_type = extensions::GetViewType(web_contents); 440 ViewType view_type = extensions::GetViewType(web_contents);
433 return view_type == extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; 441 return view_type == extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE;
434 } 442 }
435 443
436 } // namespace extensions 444 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698