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

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

Issue 11759020: Implement a TODO in the media code: Change a "const MediaStreamRequest*" arg in various APIs to "co… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 #include "chrome/browser/ui/extensions/shell_window.h" 5 #include "chrome/browser/ui/extensions/shell_window.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/extension_process_manager.h" 9 #include "chrome/browser/extensions/extension_process_manager.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // Unregister now to prevent getting NOTIFICATION_APP_TERMINATING if we're the 239 // Unregister now to prevent getting NOTIFICATION_APP_TERMINATING if we're the
240 // last window open. 240 // last window open.
241 registrar_.RemoveAll(); 241 registrar_.RemoveAll();
242 242
243 // Remove shutdown prevention. 243 // Remove shutdown prevention.
244 browser::EndKeepAlive(); 244 browser::EndKeepAlive();
245 } 245 }
246 246
247 void ShellWindow::RequestMediaAccessPermission( 247 void ShellWindow::RequestMediaAccessPermission(
248 content::WebContents* web_contents, 248 content::WebContents* web_contents,
249 const content::MediaStreamRequest* request, 249 const content::MediaStreamRequest& request,
250 const content::MediaResponseCallback& callback) { 250 const content::MediaResponseCallback& callback) {
251 // Get the preferred default devices for the request. 251 // Get the preferred default devices for the request.
252 content::MediaStreamDevices devices; 252 content::MediaStreamDevices devices;
253 media::GetDefaultDevicesForProfile( 253 media::GetDefaultDevicesForProfile(
254 profile_, 254 profile_,
255 content::IsAudioMediaType(request->audio_type), 255 content::IsAudioMediaType(request.audio_type),
256 content::IsVideoMediaType(request->video_type), 256 content::IsVideoMediaType(request.video_type),
257 &devices); 257 &devices);
258 258
259 RequestMediaAccessPermissionHelper::AuthorizeRequest( 259 RequestMediaAccessPermissionHelper::AuthorizeRequest(
260 devices, request, callback, extension(), true); 260 devices, request, callback, extension(), true);
261 } 261 }
262 262
263 WebContents* ShellWindow::OpenURLFromTab(WebContents* source, 263 WebContents* ShellWindow::OpenURLFromTab(WebContents* source,
264 const content::OpenURLParams& params) { 264 const content::OpenURLParams& params) {
265 DCHECK(source == web_contents_); 265 DCHECK(source == web_contents_);
266 266
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 const extensions::DraggableRegion& region = *iter; 628 const extensions::DraggableRegion& region = *iter;
629 sk_region->op( 629 sk_region->op(
630 region.bounds.x(), 630 region.bounds.x(),
631 region.bounds.y(), 631 region.bounds.y(),
632 region.bounds.right(), 632 region.bounds.right(),
633 region.bounds.bottom(), 633 region.bounds.bottom(),
634 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); 634 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
635 } 635 }
636 return sk_region; 636 return sk_region;
637 } 637 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/browser/ui/views/external_tab_container_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698