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

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

Issue 10917102: Context menus should appear above the touch point if invoked by long press. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 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 | 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 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 RenderWidgetHost* widget_host = widget_host_view->GetRenderWidgetHost(); 1418 RenderWidgetHost* widget_host = widget_host_view->GetRenderWidgetHost();
1419 if (!widget_host->GetProcess()->HasConnection()) { 1419 if (!widget_host->GetProcess()->HasConnection()) {
1420 // The view has gone away or the renderer crashed. Nothing to do. 1420 // The view has gone away or the renderer crashed. Nothing to do.
1421 return NULL; 1421 return NULL;
1422 } 1422 }
1423 1423
1424 return widget_host_view; 1424 return widget_host_view;
1425 } 1425 }
1426 1426
1427 void WebContentsImpl::ShowContextMenu( 1427 void WebContentsImpl::ShowContextMenu(
1428 const content::ContextMenuParams& params) { 1428 const content::ContextMenuParams& params,
1429 const content::ContextMenuSourceType& type) {
1429 // Allow WebContentsDelegates to handle the context menu operation first. 1430 // Allow WebContentsDelegates to handle the context menu operation first.
1430 if (delegate_ && delegate_->HandleContextMenu(params)) 1431 if (delegate_ && delegate_->HandleContextMenu(params))
1431 return; 1432 return;
1432 1433
1433 render_view_host_delegate_view_->ShowContextMenu(params); 1434 render_view_host_delegate_view_->ShowContextMenu(params, type);
1434 } 1435 }
1435 1436
1436 void WebContentsImpl::RequestMediaAccessPermission( 1437 void WebContentsImpl::RequestMediaAccessPermission(
1437 const content::MediaStreamRequest* request, 1438 const content::MediaStreamRequest* request,
1438 const content::MediaResponseCallback& callback) { 1439 const content::MediaResponseCallback& callback) {
1439 if (delegate_) 1440 if (delegate_)
1440 delegate_->RequestMediaAccessPermission(this, request, callback); 1441 delegate_->RequestMediaAccessPermission(this, request, callback);
1441 else 1442 else
1442 callback.Run(content::MediaStreamDevices()); 1443 callback.Run(content::MediaStreamDevices());
1443 } 1444 }
(...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after
3282 old_browser_plugin_host()->embedder_render_process_host(); 3283 old_browser_plugin_host()->embedder_render_process_host();
3283 *embedder_container_id = old_browser_plugin_host()->instance_id(); 3284 *embedder_container_id = old_browser_plugin_host()->instance_id();
3284 int embedder_process_id = 3285 int embedder_process_id =
3285 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3286 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3286 if (embedder_process_id != -1) { 3287 if (embedder_process_id != -1) {
3287 *embedder_channel_name = 3288 *embedder_channel_name =
3288 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3289 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3289 embedder_process_id); 3290 embedder_process_id);
3290 } 3291 }
3291 } 3292 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698