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

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 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 RenderWidgetHost* widget_host = widget_host_view->GetRenderWidgetHost(); 1411 RenderWidgetHost* widget_host = widget_host_view->GetRenderWidgetHost();
1412 if (!widget_host->GetProcess()->HasConnection()) { 1412 if (!widget_host->GetProcess()->HasConnection()) {
1413 // The view has gone away or the renderer crashed. Nothing to do. 1413 // The view has gone away or the renderer crashed. Nothing to do.
1414 return NULL; 1414 return NULL;
1415 } 1415 }
1416 1416
1417 return widget_host_view; 1417 return widget_host_view;
1418 } 1418 }
1419 1419
1420 void WebContentsImpl::ShowContextMenu( 1420 void WebContentsImpl::ShowContextMenu(
1421 const content::ContextMenuParams& params) { 1421 const content::ContextMenuParams& params,
1422 const content::ContextMenuEventType& type) {
1422 // Allow WebContentsDelegates to handle the context menu operation first. 1423 // Allow WebContentsDelegates to handle the context menu operation first.
1423 if (delegate_ && delegate_->HandleContextMenu(params)) 1424 if (delegate_ && delegate_->HandleContextMenu(params))
1424 return; 1425 return;
1425 1426
1426 render_view_host_delegate_view_->ShowContextMenu(params); 1427 render_view_host_delegate_view_->ShowContextMenu(params, type);
1427 } 1428 }
1428 1429
1429 void WebContentsImpl::RequestMediaAccessPermission( 1430 void WebContentsImpl::RequestMediaAccessPermission(
1430 const content::MediaStreamRequest* request, 1431 const content::MediaStreamRequest* request,
1431 const content::MediaResponseCallback& callback) { 1432 const content::MediaResponseCallback& callback) {
1432 if (delegate_) 1433 if (delegate_)
1433 delegate_->RequestMediaAccessPermission(this, request, callback); 1434 delegate_->RequestMediaAccessPermission(this, request, callback);
1434 else 1435 else
1435 callback.Run(content::MediaStreamDevices()); 1436 callback.Run(content::MediaStreamDevices());
1436 } 1437 }
(...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after
3253 old_browser_plugin_host()->embedder_render_process_host(); 3254 old_browser_plugin_host()->embedder_render_process_host();
3254 *embedder_container_id = old_browser_plugin_host()->instance_id(); 3255 *embedder_container_id = old_browser_plugin_host()->instance_id();
3255 int embedder_process_id = 3256 int embedder_process_id =
3256 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3257 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3257 if (embedder_process_id != -1) { 3258 if (embedder_process_id != -1) {
3258 *embedder_channel_name = 3259 *embedder_channel_name =
3259 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3260 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3260 embedder_process_id); 3261 embedder_process_id);
3261 } 3262 }
3262 } 3263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698