| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "android_webview/common/aw_hit_test_data.h" | 5 #include "android_webview/common/aw_hit_test_data.h" |
| 6 #include "android_webview/common/render_view_messages.h" | 6 #include "android_webview/common/render_view_messages.h" |
| 7 #include "android_webview/renderer/aw_render_frame_ext.h" | 7 #include "android_webview/renderer/aw_render_frame_ext.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "content/public/renderer/android_content_detection_prefixes.h" | 9 #include "content/public/renderer/android_content_detection_prefixes.h" |
| 10 #include "content/public/renderer/document_state.h" | 10 #include "content/public/renderer/document_state.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 AwRenderFrameExt::~AwRenderFrameExt() { | 137 AwRenderFrameExt::~AwRenderFrameExt() { |
| 138 } | 138 } |
| 139 | 139 |
| 140 void AwRenderFrameExt::DidCommitProvisionalLoad(bool is_new_navigation, | 140 void AwRenderFrameExt::DidCommitProvisionalLoad(bool is_new_navigation, |
| 141 bool is_same_page_navigation) { | 141 bool is_same_page_navigation) { |
| 142 blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); | 142 blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); |
| 143 content::DocumentState* document_state = | 143 content::DocumentState* document_state = |
| 144 content::DocumentState::FromDataSource(frame->dataSource()); | 144 content::DocumentState::FromDataSource(frame->dataSource()); |
| 145 if (document_state->can_load_local_resources()) { | 145 if (document_state->can_load_local_resources()) { |
| 146 blink::WebSecurityOrigin origin = frame->document().securityOrigin(); | 146 blink::WebSecurityOrigin origin = frame->document().getSecurityOrigin(); |
| 147 origin.grantLoadLocalResources(); | 147 origin.grantLoadLocalResources(); |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 | 150 |
| 151 bool AwRenderFrameExt::OnMessageReceived(const IPC::Message& message) { | 151 bool AwRenderFrameExt::OnMessageReceived(const IPC::Message& message) { |
| 152 bool handled = true; | 152 bool handled = true; |
| 153 IPC_BEGIN_MESSAGE_MAP(AwRenderFrameExt, message) | 153 IPC_BEGIN_MESSAGE_MAP(AwRenderFrameExt, message) |
| 154 IPC_MESSAGE_HANDLER(AwViewMsg_DocumentHasImages, OnDocumentHasImagesRequest) | 154 IPC_MESSAGE_HANDLER(AwViewMsg_DocumentHasImages, OnDocumentHasImagesRequest) |
| 155 IPC_MESSAGE_HANDLER(AwViewMsg_DoHitTest, OnDoHitTest) | 155 IPC_MESSAGE_HANDLER(AwViewMsg_DoHitTest, OnDoHitTest) |
| 156 IPC_MESSAGE_HANDLER(AwViewMsg_SetTextZoomFactor, OnSetTextZoomFactor) | 156 IPC_MESSAGE_HANDLER(AwViewMsg_SetTextZoomFactor, OnSetTextZoomFactor) |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 } | 280 } |
| 281 | 281 |
| 282 blink::WebFrameWidget* AwRenderFrameExt::GetWebFrameWidget() { | 282 blink::WebFrameWidget* AwRenderFrameExt::GetWebFrameWidget() { |
| 283 if (!render_frame() || !render_frame()->GetRenderView()) | 283 if (!render_frame() || !render_frame()->GetRenderView()) |
| 284 return nullptr; | 284 return nullptr; |
| 285 | 285 |
| 286 return render_frame()->GetRenderView()->GetWebFrameWidget(); | 286 return render_frame()->GetRenderView()->GetWebFrameWidget(); |
| 287 } | 287 } |
| 288 | 288 |
| 289 } // namespace android_webview | 289 } // namespace android_webview |
| OLD | NEW |