| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "content/common/ssl_status_serialization.h" | 50 #include "content/common/ssl_status_serialization.h" |
| 51 #include "content/common/view_messages.h" | 51 #include "content/common/view_messages.h" |
| 52 #include "content/public/common/bindings_policy.h" | 52 #include "content/public/common/bindings_policy.h" |
| 53 #include "content/public/common/content_client.h" | 53 #include "content/public/common/content_client.h" |
| 54 #include "content/public/common/content_constants.h" | 54 #include "content/public/common/content_constants.h" |
| 55 #include "content/public/common/content_switches.h" | 55 #include "content/public/common/content_switches.h" |
| 56 #include "content/public/common/drop_data.h" | 56 #include "content/public/common/drop_data.h" |
| 57 #include "content/public/common/favicon_url.h" | 57 #include "content/public/common/favicon_url.h" |
| 58 #include "content/public/common/file_chooser_file_info.h" | 58 #include "content/public/common/file_chooser_file_info.h" |
| 59 #include "content/public/common/file_chooser_params.h" | 59 #include "content/public/common/file_chooser_params.h" |
| 60 #include "content/public/common/page_importance_signals.h" |
| 60 #include "content/public/common/page_state.h" | 61 #include "content/public/common/page_state.h" |
| 61 #include "content/public/common/page_zoom.h" | 62 #include "content/public/common/page_zoom.h" |
| 62 #include "content/public/common/ssl_status.h" | 63 #include "content/public/common/ssl_status.h" |
| 63 #include "content/public/common/three_d_api_types.h" | 64 #include "content/public/common/three_d_api_types.h" |
| 64 #include "content/public/common/url_constants.h" | 65 #include "content/public/common/url_constants.h" |
| 65 #include "content/public/common/url_utils.h" | 66 #include "content/public/common/url_utils.h" |
| 66 #include "content/public/common/web_preferences.h" | 67 #include "content/public/common/web_preferences.h" |
| 67 #include "content/public/renderer/content_renderer_client.h" | 68 #include "content/public/renderer/content_renderer_client.h" |
| 68 #include "content/public/renderer/document_state.h" | 69 #include "content/public/renderer/document_state.h" |
| 69 #include "content/public/renderer/navigation_state.h" | 70 #include "content/public/renderer/navigation_state.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 #include "third_party/WebKit/public/web/WebGlyphCache.h" | 145 #include "third_party/WebKit/public/web/WebGlyphCache.h" |
| 145 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 146 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
| 146 #include "third_party/WebKit/public/web/WebHitTestResult.h" | 147 #include "third_party/WebKit/public/web/WebHitTestResult.h" |
| 147 #include "third_party/WebKit/public/web/WebInputElement.h" | 148 #include "third_party/WebKit/public/web/WebInputElement.h" |
| 148 #include "third_party/WebKit/public/web/WebInputEvent.h" | 149 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 149 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 150 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 150 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h" | 151 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h" |
| 151 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 152 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
| 152 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" | 153 #include "third_party/WebKit/public/web/WebNetworkStateNotifier.h" |
| 153 #include "third_party/WebKit/public/web/WebNodeList.h" | 154 #include "third_party/WebKit/public/web/WebNodeList.h" |
| 155 #include "third_party/WebKit/public/web/WebPageImportanceSignals.h" |
| 154 #include "third_party/WebKit/public/web/WebPageSerializer.h" | 156 #include "third_party/WebKit/public/web/WebPageSerializer.h" |
| 155 #include "third_party/WebKit/public/web/WebPlugin.h" | 157 #include "third_party/WebKit/public/web/WebPlugin.h" |
| 156 #include "third_party/WebKit/public/web/WebPluginAction.h" | 158 #include "third_party/WebKit/public/web/WebPluginAction.h" |
| 157 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 159 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
| 158 #include "third_party/WebKit/public/web/WebPluginDocument.h" | 160 #include "third_party/WebKit/public/web/WebPluginDocument.h" |
| 159 #include "third_party/WebKit/public/web/WebRange.h" | 161 #include "third_party/WebKit/public/web/WebRange.h" |
| 160 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 162 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| 161 #include "third_party/WebKit/public/web/WebScriptSource.h" | 163 #include "third_party/WebKit/public/web/WebScriptSource.h" |
| 162 #include "third_party/WebKit/public/web/WebSearchableFormData.h" | 164 #include "third_party/WebKit/public/web/WebSearchableFormData.h" |
| 163 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 165 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| (...skipping 3289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3453 return current_state; | 3455 return current_state; |
| 3454 } | 3456 } |
| 3455 | 3457 |
| 3456 void RenderViewImpl::draggableRegionsChanged() { | 3458 void RenderViewImpl::draggableRegionsChanged() { |
| 3457 FOR_EACH_OBSERVER( | 3459 FOR_EACH_OBSERVER( |
| 3458 RenderViewObserver, | 3460 RenderViewObserver, |
| 3459 observers_, | 3461 observers_, |
| 3460 DraggableRegionsChanged(webview()->mainFrame())); | 3462 DraggableRegionsChanged(webview()->mainFrame())); |
| 3461 } | 3463 } |
| 3462 | 3464 |
| 3465 void RenderViewImpl::pageImportanceSignalsChanged() { |
| 3466 if (!webview() || !main_render_frame_) |
| 3467 return; |
| 3468 |
| 3469 const auto& web_signals = webview()->pageImportanceSignals(); |
| 3470 |
| 3471 PageImportanceSignals signals; |
| 3472 signals.had_form_interaction = web_signals->hadFormInteraction(); |
| 3473 |
| 3474 main_render_frame_->Send(new FrameHostMsg_UpdatePageImportanceSignals( |
| 3475 main_render_frame_->GetRoutingID(), signals)); |
| 3476 } |
| 3477 |
| 3463 #if defined(OS_ANDROID) | 3478 #if defined(OS_ANDROID) |
| 3464 WebContentDetectionResult RenderViewImpl::detectContentAround( | 3479 WebContentDetectionResult RenderViewImpl::detectContentAround( |
| 3465 const WebHitTestResult& touch_hit) { | 3480 const WebHitTestResult& touch_hit) { |
| 3466 DCHECK(touch_hit.node().isTextNode()); | 3481 DCHECK(touch_hit.node().isTextNode()); |
| 3467 | 3482 |
| 3468 // Process the position with all the registered content detectors until | 3483 // Process the position with all the registered content detectors until |
| 3469 // a match is found. Priority is provided by their relative order. | 3484 // a match is found. Priority is provided by their relative order. |
| 3470 for (ContentDetectorList::const_iterator it = content_detectors_.begin(); | 3485 for (ContentDetectorList::const_iterator it = content_detectors_.begin(); |
| 3471 it != content_detectors_.end(); ++it) { | 3486 it != content_detectors_.end(); ++it) { |
| 3472 ContentDetector::Result content = (*it)->FindTappedContent(touch_hit); | 3487 ContentDetector::Result content = (*it)->FindTappedContent(touch_hit); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3726 std::vector<gfx::Size> sizes; | 3741 std::vector<gfx::Size> sizes; |
| 3727 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3742 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3728 if (!url.isEmpty()) | 3743 if (!url.isEmpty()) |
| 3729 urls.push_back( | 3744 urls.push_back( |
| 3730 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3745 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3731 } | 3746 } |
| 3732 SendUpdateFaviconURL(urls); | 3747 SendUpdateFaviconURL(urls); |
| 3733 } | 3748 } |
| 3734 | 3749 |
| 3735 } // namespace content | 3750 } // namespace content |
| OLD | NEW |