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

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

Issue 1811913003: PlzNavigate: support NavigationThrottle::WillProcessResponse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 9 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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1367 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows, 1367 IPC_MESSAGE_HANDLER(ViewMsg_DisableScrollbarsForSmallWindows,
1368 OnDisableScrollbarsForSmallWindows) 1368 OnDisableScrollbarsForSmallWindows)
1369 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs) 1369 IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs)
1370 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt) 1370 IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt)
1371 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt) 1371 IPC_MESSAGE_HANDLER(ViewMsg_PluginActionAt, OnPluginActionAt)
1372 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive) 1372 IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive)
1373 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) 1373 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu)
1374 // TODO(viettrungluu): Move to a separate message filter. 1374 // TODO(viettrungluu): Move to a separate message filter.
1375 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryOffsetAndLength, 1375 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryOffsetAndLength,
1376 OnSetHistoryOffsetAndLength) 1376 OnSetHistoryOffsetAndLength)
1377 IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode)
1378 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, 1377 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap,
1379 OnReleaseDisambiguationPopupBitmap) 1378 OnReleaseDisambiguationPopupBitmap)
1380 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) 1379 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw)
1381 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) 1380 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret)
1382 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, 1381 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect,
1383 OnUpdateWindowScreenRect) 1382 OnUpdateWindowScreenRect)
1384 #if defined(OS_ANDROID) 1383 #if defined(OS_ANDROID)
1385 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState, 1384 IPC_MESSAGE_HANDLER(ViewMsg_UpdateTopControlsState,
1386 OnUpdateTopControlsState) 1385 OnUpdateTopControlsState)
1387 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) 1386 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData)
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after
3247 void RenderViewImpl::OnShowContextMenu( 3246 void RenderViewImpl::OnShowContextMenu(
3248 ui::MenuSourceType source_type, const gfx::Point& location) { 3247 ui::MenuSourceType source_type, const gfx::Point& location) {
3249 input_handler_->set_context_menu_source_type(source_type); 3248 input_handler_->set_context_menu_source_type(source_type);
3250 has_host_context_menu_location_ = true; 3249 has_host_context_menu_location_ = true;
3251 host_context_menu_location_ = location; 3250 host_context_menu_location_ = location;
3252 if (webview()) 3251 if (webview())
3253 webview()->showContextMenu(); 3252 webview()->showContextMenu();
3254 has_host_context_menu_location_ = false; 3253 has_host_context_menu_location_ = false;
3255 } 3254 }
3256 3255
3257 void RenderViewImpl::OnEnableViewSourceMode() {
3258 if (!webview())
3259 return;
3260 WebFrame* main_frame = webview()->mainFrame();
3261 if (!main_frame)
3262 return;
3263 main_frame->enableViewSourceMode(true);
3264 }
3265
3266 #if defined(OS_ANDROID) || defined(USE_AURA) 3256 #if defined(OS_ANDROID) || defined(USE_AURA)
3267 bool RenderViewImpl::didTapMultipleTargets( 3257 bool RenderViewImpl::didTapMultipleTargets(
3268 const WebSize& inner_viewport_offset, 3258 const WebSize& inner_viewport_offset,
3269 const WebRect& touch_rect, 3259 const WebRect& touch_rect,
3270 const WebVector<WebRect>& target_rects) { 3260 const WebVector<WebRect>& target_rects) {
3271 DCHECK(switches::IsLinkDisambiguationPopupEnabled()); 3261 DCHECK(switches::IsLinkDisambiguationPopupEnabled());
3272 3262
3273 // Never show a disambiguation popup when accessibility is enabled, 3263 // Never show a disambiguation popup when accessibility is enabled,
3274 // as this interferes with "touch exploration". 3264 // as this interferes with "touch exploration".
3275 AccessibilityMode accessibility_mode = 3265 AccessibilityMode accessibility_mode =
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
3452 if (IsUseZoomForDSFEnabled()) { 3442 if (IsUseZoomForDSFEnabled()) {
3453 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3443 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3454 } else { 3444 } else {
3455 webview()->setDeviceScaleFactor(device_scale_factor_); 3445 webview()->setDeviceScaleFactor(device_scale_factor_);
3456 } 3446 }
3457 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3447 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3458 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3448 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3459 } 3449 }
3460 3450
3461 } // namespace content 3451 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698