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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.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_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/browser/renderer_host/dip_util.h" 8 #include "content/browser/renderer_host/dip_util.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/web_contents/interstitial_page_impl.h" 10 #include "content/browser/web_contents/interstitial_page_impl.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 399
400 gfx::Rect WebContentsViewAura::GetViewBounds() const { 400 gfx::Rect WebContentsViewAura::GetViewBounds() const {
401 return window_->GetBoundsInRootWindow(); 401 return window_->GetBoundsInRootWindow();
402 } 402 }
403 403
404 //////////////////////////////////////////////////////////////////////////////// 404 ////////////////////////////////////////////////////////////////////////////////
405 // WebContentsViewAura, RenderViewHostDelegateView implementation: 405 // WebContentsViewAura, RenderViewHostDelegateView implementation:
406 406
407 void WebContentsViewAura::ShowContextMenu( 407 void WebContentsViewAura::ShowContextMenu(
408 const content::ContextMenuParams& params) { 408 const content::ContextMenuParams& params,
409 const content::ContextMenuSourceType& type) {
409 if (delegate_.get()) 410 if (delegate_.get())
410 delegate_->ShowContextMenu(params); 411 delegate_->ShowContextMenu(params, type);
411 } 412 }
412 413
413 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, 414 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds,
414 int item_height, 415 int item_height,
415 double item_font_size, 416 double item_font_size,
416 int selected_item, 417 int selected_item,
417 const std::vector<WebMenuItem>& items, 418 const std::vector<WebMenuItem>& items,
418 bool right_aligned, 419 bool right_aligned,
419 bool allow_multiple_selection) { 420 bool allow_multiple_selection) {
420 // External popup menus are only used on Mac and Android. 421 // External popup menus are only used on Mac and Android.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 OnDragEntered(event); 634 OnDragEntered(event);
634 635
635 web_contents_->GetRenderViewHost()->DragTargetDrop( 636 web_contents_->GetRenderViewHost()->DragTargetDrop(
636 event.location(), 637 event.location(),
637 gfx::Screen::GetCursorScreenPoint(), 638 gfx::Screen::GetCursorScreenPoint(),
638 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 639 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
639 if (drag_dest_delegate_) 640 if (drag_dest_delegate_)
640 drag_dest_delegate_->OnDrop(); 641 drag_dest_delegate_->OnDrop();
641 return current_drag_op_; 642 return current_drag_op_;
642 } 643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698