| 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 "android_webview/renderer/aw_render_view_ext.h" | 5 #include "android_webview/renderer/aw_render_view_ext.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "android_webview/common/aw_hit_test_data.h" | 9 #include "android_webview/common/aw_hit_test_data.h" |
| 10 #include "android_webview/common/render_view_messages.h" | 10 #include "android_webview/common/render_view_messages.h" |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.h" |
| 13 #include "content/public/common/url_constants.h" | 13 #include "content/public/common/url_constants.h" |
| 14 #include "content/public/renderer/android_content_detection_prefixes.h" | 14 #include "content/public/renderer/android_content_detection_prefixes.h" |
| 15 #include "content/public/renderer/document_state.h" | 15 #include "content/public/renderer/document_state.h" |
| 16 #include "content/public/renderer/render_view.h" | 16 #include "content/public/renderer/render_view.h" |
| 17 #include "skia/ext/refptr.h" | 17 #include "skia/ext/refptr.h" |
| 18 #include "third_party/WebKit/public/platform/WebSize.h" | 18 #include "third_party/WebKit/public/platform/WebSize.h" |
| 19 #include "third_party/WebKit/public/platform/WebURL.h" | 19 #include "third_party/WebKit/public/platform/WebURL.h" |
| 20 #include "third_party/WebKit/public/platform/WebVector.h" | 20 #include "third_party/WebKit/public/platform/WebVector.h" |
| 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" | 21 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 22 #include "third_party/WebKit/public/web/WebDocument.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 23 #include "third_party/WebKit/public/web/WebElement.h" |
| 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 24 #include "third_party/WebKit/public/web/WebFrame.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHitTestResult.h" | 25 #include "third_party/WebKit/public/web/WebHitTestResult.h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" | 26 #include "third_party/WebKit/public/web/WebNode.h" |
| 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" | 27 #include "third_party/WebKit/public/web/WebNodeList.h" |
| 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 28 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| 29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 29 #include "third_party/WebKit/public/web/WebView.h" |
| 30 | 30 |
| 31 namespace android_webview { | 31 namespace android_webview { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 bool AllowMixedContent(const WebKit::WebURL& url) { | 35 bool AllowMixedContent(const WebKit::WebURL& url) { |
| 36 // We treat non-standard schemes as "secure" in the WebView to allow them to | 36 // We treat non-standard schemes as "secure" in the WebView to allow them to |
| 37 // be used for request interception. | 37 // be used for request interception. |
| 38 // TODO(benm): Tighten this restriction by requiring embedders to register | 38 // TODO(benm): Tighten this restriction by requiring embedders to register |
| 39 // their custom schemes? See b/9420953. | 39 // their custom schemes? See b/9420953. |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 } | 277 } |
| 278 | 278 |
| 279 void AwRenderViewExt::OnSetInitialPageScale(double page_scale_factor) { | 279 void AwRenderViewExt::OnSetInitialPageScale(double page_scale_factor) { |
| 280 if (!render_view() || !render_view()->GetWebView()) | 280 if (!render_view() || !render_view()->GetWebView()) |
| 281 return; | 281 return; |
| 282 render_view()->GetWebView()->setInitialPageScaleOverride( | 282 render_view()->GetWebView()->setInitialPageScaleOverride( |
| 283 page_scale_factor); | 283 page_scale_factor); |
| 284 } | 284 } |
| 285 | 285 |
| 286 } // namespace android_webview | 286 } // namespace android_webview |
| OLD | NEW |