OLD | NEW |
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/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 | 1394 |
1395 if (!enabled) | 1395 if (!enabled) |
1396 navigation_overlay_.reset(); | 1396 navigation_overlay_.reset(); |
1397 else if (!navigation_overlay_) | 1397 else if (!navigation_overlay_) |
1398 navigation_overlay_.reset(new OverscrollNavigationOverlay(web_contents_)); | 1398 navigation_overlay_.reset(new OverscrollNavigationOverlay(web_contents_)); |
1399 } | 1399 } |
1400 | 1400 |
1401 //////////////////////////////////////////////////////////////////////////////// | 1401 //////////////////////////////////////////////////////////////////////////////// |
1402 // WebContentsViewAura, RenderViewHostDelegateView implementation: | 1402 // WebContentsViewAura, RenderViewHostDelegateView implementation: |
1403 | 1403 |
1404 void WebContentsViewAura::ShowContextMenu(const ContextMenuParams& params) { | 1404 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host, |
| 1405 const ContextMenuParams& params) { |
1405 if (touch_editable_) | 1406 if (touch_editable_) |
1406 touch_editable_->EndTouchEditing(false); | 1407 touch_editable_->EndTouchEditing(false); |
1407 if (delegate_) { | 1408 if (delegate_) { |
1408 delegate_->ShowContextMenu(params); | 1409 delegate_->ShowContextMenu(render_frame_host, params); |
1409 // WARNING: we may have been deleted during the call to ShowContextMenu(). | 1410 // WARNING: we may have been deleted during the call to ShowContextMenu(). |
1410 } | 1411 } |
1411 } | 1412 } |
1412 | 1413 |
1413 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, | 1414 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, |
1414 int item_height, | 1415 int item_height, |
1415 double item_font_size, | 1416 double item_font_size, |
1416 int selected_item, | 1417 int selected_item, |
1417 const std::vector<MenuItem>& items, | 1418 const std::vector<MenuItem>& items, |
1418 bool right_aligned, | 1419 bool right_aligned, |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1791 event.location(), | 1792 event.location(), |
1792 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), | 1793 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), |
1793 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 1794 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
1794 if (drag_dest_delegate_) | 1795 if (drag_dest_delegate_) |
1795 drag_dest_delegate_->OnDrop(); | 1796 drag_dest_delegate_->OnDrop(); |
1796 current_drop_data_.reset(); | 1797 current_drop_data_.reset(); |
1797 return ConvertFromWeb(current_drag_op_); | 1798 return ConvertFromWeb(current_drag_op_); |
1798 } | 1799 } |
1799 | 1800 |
1800 } // namespace content | 1801 } // namespace content |
OLD | NEW |