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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2894043002: Add machinery to show touch editing context menus in OOPIFs. (Closed)
Patch Set: Remove WVI call to WFWI. Created 3 years, 6 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
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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode, 1227 IPC_MESSAGE_HANDLER(ViewMsg_EnablePreferredSizeChangedMode,
1228 OnEnablePreferredSizeChangedMode) 1228 OnEnablePreferredSizeChangedMode)
1229 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize) 1229 IPC_MESSAGE_HANDLER(ViewMsg_EnableAutoResize, OnEnableAutoResize)
1230 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize) 1230 IPC_MESSAGE_HANDLER(ViewMsg_DisableAutoResize, OnDisableAutoResize)
1231 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, 1231 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows,
1232 OnDisableScrollbarsForSmallWindows) 1232 OnDisableScrollbarsForSmallWindows)
1233 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) 1233 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs)
1234 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) 1234 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt)
1235 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) 1235 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt)
1236 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) 1236 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive)
1237 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu)
1238 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, 1237 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap,
1239 OnReleaseDisambiguationPopupBitmap) 1238 OnReleaseDisambiguationPopupBitmap)
1240 IPC_MESSAGE_HANDLER(ViewMsg_ResolveTapDisambiguation, 1239 IPC_MESSAGE_HANDLER(ViewMsg_ResolveTapDisambiguation,
1241 OnResolveTapDisambiguation) 1240 OnResolveTapDisambiguation)
1242 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) 1241 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw)
1243 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) 1242 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret)
1244 1243
1245 // Page messages. 1244 // Page messages.
1246 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, 1245 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect,
1247 OnUpdateWindowScreenRect) 1246 OnUpdateWindowScreenRect)
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 date_time_picker_client_.reset( 2402 date_time_picker_client_.reset(
2404 new RendererDateTimePicker(this, params, completion)); 2403 new RendererDateTimePicker(this, params, completion));
2405 return date_time_picker_client_->Open(); 2404 return date_time_picker_client_->Open();
2406 } 2405 }
2407 2406
2408 void RenderViewImpl::DismissDateTimeDialog() { 2407 void RenderViewImpl::DismissDateTimeDialog() {
2409 DCHECK(date_time_picker_client_); 2408 DCHECK(date_time_picker_client_);
2410 date_time_picker_client_.reset(NULL); 2409 date_time_picker_client_.reset(NULL);
2411 } 2410 }
2412 2411
2413 #endif // defined(OS_ANDROID)
2414
2415 void RenderViewImpl::OnShowContextMenu(
2416 ui::MenuSourceType source_type, const gfx::Point& location) {
2417 input_handler_->set_context_menu_source_type(source_type);
2418 has_host_context_menu_location_ = true;
2419 host_context_menu_location_ = location;
2420 if (webview())
2421 webview()->ShowContextMenu();
2422 has_host_context_menu_location_ = false;
2423 }
2424
2425 #if defined(OS_ANDROID)
2426 bool RenderViewImpl::DidTapMultipleTargets( 2412 bool RenderViewImpl::DidTapMultipleTargets(
2427 const WebSize& inner_viewport_offset, 2413 const WebSize& inner_viewport_offset,
2428 const WebRect& touch_rect, 2414 const WebRect& touch_rect,
2429 const WebVector<WebRect>& target_rects) { 2415 const WebVector<WebRect>& target_rects) {
2430 // Never show a disambiguation popup when accessibility is enabled, 2416 // Never show a disambiguation popup when accessibility is enabled,
2431 // as this interferes with "touch exploration". 2417 // as this interferes with "touch exploration".
2432 AccessibilityMode accessibility_mode = 2418 AccessibilityMode accessibility_mode =
2433 GetMainRenderFrame()->accessibility_mode(); 2419 GetMainRenderFrame()->accessibility_mode();
2434 if (accessibility_mode == kAccessibilityModeComplete) 2420 if (accessibility_mode == kAccessibilityModeComplete)
2435 return false; 2421 return false;
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 input_event.GetCoalescedEventsPointers(), latency_info, 2660 input_event.GetCoalescedEventsPointers(), latency_info,
2675 dispatch_type); 2661 dispatch_type);
2676 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 2662 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
2677 } 2663 }
2678 idle_user_detector_->ActivityDetected(); 2664 idle_user_detector_->ActivityDetected();
2679 return RenderWidget::HandleInputEvent(input_event, latency_info, 2665 return RenderWidget::HandleInputEvent(input_event, latency_info,
2680 dispatch_type); 2666 dispatch_type);
2681 } 2667 }
2682 2668
2683 } // namespace content 2669 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698