| 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/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 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1356 IPC_MESSAGE_HANDLER(ViewMsg_GetAllSavableResourceLinksForCurrentPage, | 1356 IPC_MESSAGE_HANDLER(ViewMsg_GetAllSavableResourceLinksForCurrentPage, |
| 1357 OnGetAllSavableResourceLinksForCurrentPage) | 1357 OnGetAllSavableResourceLinksForCurrentPage) |
| 1358 IPC_MESSAGE_HANDLER( | 1358 IPC_MESSAGE_HANDLER( |
| 1359 ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks, | 1359 ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks, |
| 1360 OnGetSerializedHtmlDataForCurrentPageWithLocalLinks) | 1360 OnGetSerializedHtmlDataForCurrentPageWithLocalLinks) |
| 1361 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) | 1361 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) |
| 1362 // TODO(viettrungluu): Move to a separate message filter. | 1362 // TODO(viettrungluu): Move to a separate message filter. |
| 1363 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryLengthAndPrune, | 1363 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryLengthAndPrune, |
| 1364 OnSetHistoryLengthAndPrune) | 1364 OnSetHistoryLengthAndPrune) |
| 1365 IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode) | 1365 IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode) |
| 1366 IPC_MESSAGE_HANDLER(ViewMsg_DisownOpener, OnDisownOpener) | |
| 1367 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, | 1366 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, |
| 1368 OnReleaseDisambiguationPopupBitmap) | 1367 OnReleaseDisambiguationPopupBitmap) |
| 1369 IPC_MESSAGE_HANDLER(ViewMsg_WindowSnapshotCompleted, | 1368 IPC_MESSAGE_HANDLER(ViewMsg_WindowSnapshotCompleted, |
| 1370 OnWindowSnapshotCompleted) | 1369 OnWindowSnapshotCompleted) |
| 1371 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) | 1370 IPC_MESSAGE_HANDLER(ViewMsg_ForceRedraw, OnForceRedraw) |
| 1372 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) | 1371 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) |
| 1373 #if defined(OS_ANDROID) | 1372 #if defined(OS_ANDROID) |
| 1374 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult, | 1373 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult, |
| 1375 OnActivateNearestFindResult) | 1374 OnActivateNearestFindResult) |
| 1376 IPC_MESSAGE_HANDLER(ViewMsg_FindMatchRects, OnFindMatchRects) | 1375 IPC_MESSAGE_HANDLER(ViewMsg_FindMatchRects, OnFindMatchRects) |
| (...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4087 | 4086 |
| 4088 void RenderViewImpl::OnEnableViewSourceMode() { | 4087 void RenderViewImpl::OnEnableViewSourceMode() { |
| 4089 if (!webview()) | 4088 if (!webview()) |
| 4090 return; | 4089 return; |
| 4091 WebFrame* main_frame = webview()->mainFrame(); | 4090 WebFrame* main_frame = webview()->mainFrame(); |
| 4092 if (!main_frame) | 4091 if (!main_frame) |
| 4093 return; | 4092 return; |
| 4094 main_frame->enableViewSourceMode(true); | 4093 main_frame->enableViewSourceMode(true); |
| 4095 } | 4094 } |
| 4096 | 4095 |
| 4097 void RenderViewImpl::OnDisownOpener() { | |
| 4098 if (!webview()) | |
| 4099 return; | |
| 4100 | |
| 4101 WebFrame* main_frame = webview()->mainFrame(); | |
| 4102 if (main_frame && main_frame->opener()) | |
| 4103 main_frame->setOpener(NULL); | |
| 4104 } | |
| 4105 | |
| 4106 #if defined(OS_ANDROID) | 4096 #if defined(OS_ANDROID) |
| 4107 bool RenderViewImpl::didTapMultipleTargets( | 4097 bool RenderViewImpl::didTapMultipleTargets( |
| 4108 const blink::WebGestureEvent& event, | 4098 const blink::WebGestureEvent& event, |
| 4109 const WebVector<WebRect>& target_rects) { | 4099 const WebVector<WebRect>& target_rects) { |
| 4110 // Never show a disambiguation popup when accessibility is enabled, | 4100 // Never show a disambiguation popup when accessibility is enabled, |
| 4111 // as this interferes with "touch exploration". | 4101 // as this interferes with "touch exploration". |
| 4112 AccessibilityMode accessibility_mode = | 4102 AccessibilityMode accessibility_mode = |
| 4113 main_render_frame()->accessibility_mode(); | 4103 main_render_frame()->accessibility_mode(); |
| 4114 bool matches_accessibility_mode_complete = | 4104 bool matches_accessibility_mode_complete = |
| 4115 (accessibility_mode & AccessibilityModeComplete) == | 4105 (accessibility_mode & AccessibilityModeComplete) == |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4272 std::vector<gfx::Size> sizes; | 4262 std::vector<gfx::Size> sizes; |
| 4273 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4263 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4274 if (!url.isEmpty()) | 4264 if (!url.isEmpty()) |
| 4275 urls.push_back( | 4265 urls.push_back( |
| 4276 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4266 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4277 } | 4267 } |
| 4278 SendUpdateFaviconURL(urls); | 4268 SendUpdateFaviconURL(urls); |
| 4279 } | 4269 } |
| 4280 | 4270 |
| 4281 } // namespace content | 4271 } // namespace content |
| OLD | NEW |