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

Side by Side Diff: extensions/browser/app_window/app_window.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 | « extensions/browser/app_window/app_window.h ('k') | extensions/browser/extension_host.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 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/app_window/app_window.h" 5 #include "extensions/browser/app_window/app_window.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 } 356 }
357 357
358 void AppWindow::RequestMediaAccessPermission( 358 void AppWindow::RequestMediaAccessPermission(
359 content::WebContents* web_contents, 359 content::WebContents* web_contents,
360 const content::MediaStreamRequest& request, 360 const content::MediaStreamRequest& request,
361 const content::MediaResponseCallback& callback) { 361 const content::MediaResponseCallback& callback) {
362 DCHECK_EQ(AppWindow::web_contents(), web_contents); 362 DCHECK_EQ(AppWindow::web_contents(), web_contents);
363 helper_->RequestMediaAccessPermission(request, callback); 363 helper_->RequestMediaAccessPermission(request, callback);
364 } 364 }
365 365
366 bool AppWindow::CheckMediaAccessPermission(content::WebContents* web_contents,
367 const GURL& security_origin,
368 content::MediaStreamType type) {
369 DCHECK_EQ(AppWindow::web_contents(), web_contents);
370 return helper_->CheckMediaAccessPermission(security_origin, type);
371 }
372
366 WebContents* AppWindow::OpenURLFromTab(WebContents* source, 373 WebContents* AppWindow::OpenURLFromTab(WebContents* source,
367 const content::OpenURLParams& params) { 374 const content::OpenURLParams& params) {
368 DCHECK_EQ(web_contents(), source); 375 DCHECK_EQ(web_contents(), source);
369 return helper_->OpenURLFromTab(params); 376 return helper_->OpenURLFromTab(params);
370 } 377 }
371 378
372 void AppWindow::AddNewContents(WebContents* source, 379 void AppWindow::AddNewContents(WebContents* source,
373 WebContents* new_contents, 380 WebContents* new_contents,
374 WindowOpenDisposition disposition, 381 WindowOpenDisposition disposition,
375 const gfx::Rect& initial_pos, 382 const gfx::Rect& initial_pos,
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 region.bounds.x(), 1089 region.bounds.x(),
1083 region.bounds.y(), 1090 region.bounds.y(),
1084 region.bounds.right(), 1091 region.bounds.right(),
1085 region.bounds.bottom(), 1092 region.bounds.bottom(),
1086 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 1093 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
1087 } 1094 }
1088 return sk_region; 1095 return sk_region;
1089 } 1096 }
1090 1097
1091 } // namespace extensions 1098 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/app_window/app_window.h ('k') | extensions/browser/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698