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 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 navigation_overlay_.reset(); | 1138 navigation_overlay_.reset(); |
1139 else if (!navigation_overlay_) | 1139 else if (!navigation_overlay_) |
1140 navigation_overlay_.reset(new OverscrollNavigationOverlay(web_contents_)); | 1140 navigation_overlay_.reset(new OverscrollNavigationOverlay(web_contents_)); |
1141 } | 1141 } |
1142 | 1142 |
1143 //////////////////////////////////////////////////////////////////////////////// | 1143 //////////////////////////////////////////////////////////////////////////////// |
1144 // WebContentsViewAura, RenderViewHostDelegateView implementation: | 1144 // WebContentsViewAura, RenderViewHostDelegateView implementation: |
1145 | 1145 |
1146 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host, | 1146 void WebContentsViewAura::ShowContextMenu(RenderFrameHost* render_frame_host, |
1147 const ContextMenuParams& params) { | 1147 const ContextMenuParams& params) { |
1148 if (touch_editable_) | 1148 if (touch_editable_) { |
1149 touch_editable_->EndTouchEditing(false); | 1149 touch_editable_->EndTouchEditing(false); |
| 1150 } |
1150 if (delegate_) { | 1151 if (delegate_) { |
1151 delegate_->ShowContextMenu(render_frame_host, params); | 1152 delegate_->ShowContextMenu(render_frame_host, params); |
1152 // WARNING: we may have been deleted during the call to ShowContextMenu(). | 1153 // WARNING: we may have been deleted during the call to ShowContextMenu(). |
1153 } | 1154 } |
1154 } | 1155 } |
1155 | 1156 |
1156 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, | 1157 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, |
1157 int item_height, | 1158 int item_height, |
1158 double item_font_size, | 1159 double item_font_size, |
1159 int selected_item, | 1160 int selected_item, |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 event.location(), | 1535 event.location(), |
1535 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), | 1536 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), |
1536 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 1537 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
1537 if (drag_dest_delegate_) | 1538 if (drag_dest_delegate_) |
1538 drag_dest_delegate_->OnDrop(); | 1539 drag_dest_delegate_->OnDrop(); |
1539 current_drop_data_.reset(); | 1540 current_drop_data_.reset(); |
1540 return ConvertFromWeb(current_drag_op_); | 1541 return ConvertFromWeb(current_drag_op_); |
1541 } | 1542 } |
1542 | 1543 |
1543 } // namespace content | 1544 } // namespace content |
OLD | NEW |