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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10542092: Refactor the content interface for RequestMediaAccessPermission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 1309
1310 void WebContentsImpl::ShowContextMenu( 1310 void WebContentsImpl::ShowContextMenu(
1311 const content::ContextMenuParams& params) { 1311 const content::ContextMenuParams& params) {
1312 // Allow WebContentsDelegates to handle the context menu operation first. 1312 // Allow WebContentsDelegates to handle the context menu operation first.
1313 if (delegate_ && delegate_->HandleContextMenu(params)) 1313 if (delegate_ && delegate_->HandleContextMenu(params))
1314 return; 1314 return;
1315 1315
1316 render_view_host_delegate_view_->ShowContextMenu(params); 1316 render_view_host_delegate_view_->ShowContextMenu(params);
1317 } 1317 }
1318 1318
1319 void WebContentsImpl::RequestMediaAccessPermission(
1320 const content::MediaStreamRequest* request,
1321 const content::MediaResponseCallback& callback) {
1322 if (delegate_)
1323 delegate_->RequestMediaAccessPermission(this, request, callback);
1324 else
1325 callback.Run(content::MediaStreamDevices());
1326 }
1327
1319 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { 1328 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) {
1320 preferred_size_ = pref_size; 1329 preferred_size_ = pref_size;
1321 if (delegate_) 1330 if (delegate_)
1322 delegate_->UpdatePreferredSize(this, pref_size); 1331 delegate_->UpdatePreferredSize(this, pref_size);
1323 } 1332 }
1324 1333
1325 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { 1334 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) {
1326 if (delegate_) 1335 if (delegate_)
1327 delegate_->ResizeDueToAutoResize(this, new_size); 1336 delegate_->ResizeDueToAutoResize(this, new_size);
1328 } 1337 }
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 browser_plugin_host()->embedder_render_process_host(); 3033 browser_plugin_host()->embedder_render_process_host();
3025 *embedder_container_id = browser_plugin_host()->instance_id(); 3034 *embedder_container_id = browser_plugin_host()->instance_id();
3026 int embedder_process_id = 3035 int embedder_process_id =
3027 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3036 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3028 if (embedder_process_id != -1) { 3037 if (embedder_process_id != -1) {
3029 *embedder_channel_name = 3038 *embedder_channel_name =
3030 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3039 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3031 embedder_process_id); 3040 embedder_process_id);
3032 } 3041 }
3033 } 3042 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698