| 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 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 #include "third_party/icu/source/common/unicode/uchar.h" | 163 #include "third_party/icu/source/common/unicode/uchar.h" |
| 164 #include "third_party/icu/source/common/unicode/uscript.h" | 164 #include "third_party/icu/source/common/unicode/uscript.h" |
| 165 #include "ui/base/clipboard/clipboard.h" | 165 #include "ui/base/clipboard/clipboard.h" |
| 166 #include "ui/base/ui_base_switches_util.h" | 166 #include "ui/base/ui_base_switches_util.h" |
| 167 #include "ui/events/latency_info.h" | 167 #include "ui/events/latency_info.h" |
| 168 #include "ui/gfx/geometry/point.h" | 168 #include "ui/gfx/geometry/point.h" |
| 169 #include "ui/gfx/geometry/rect.h" | 169 #include "ui/gfx/geometry/rect.h" |
| 170 #include "ui/gfx/geometry/rect_conversions.h" | 170 #include "ui/gfx/geometry/rect_conversions.h" |
| 171 #include "ui/gfx/geometry/size_conversions.h" | 171 #include "ui/gfx/geometry/size_conversions.h" |
| 172 #include "ui/gfx/native_widget_types.h" | 172 #include "ui/gfx/native_widget_types.h" |
| 173 #include "url/origin.h" |
| 173 #include "url/url_constants.h" | 174 #include "url/url_constants.h" |
| 174 #include "v8/include/v8.h" | 175 #include "v8/include/v8.h" |
| 175 | 176 |
| 176 #if defined(OS_ANDROID) | 177 #if defined(OS_ANDROID) |
| 177 #include <cpu-features.h> | 178 #include <cpu-features.h> |
| 178 | 179 |
| 179 #include "base/android/build_info.h" | 180 #include "base/android/build_info.h" |
| 180 #include "content/renderer/android/address_detector.h" | 181 #include "content/renderer/android/address_detector.h" |
| 181 #include "content/renderer/android/content_detector.h" | 182 #include "content/renderer/android/content_detector.h" |
| 182 #include "content/renderer/android/disambiguation_popup_helper.h" | 183 #include "content/renderer/android/disambiguation_popup_helper.h" |
| (...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 // | 1524 // |
| 1524 // TODO(alexmos): This works fine for regular origins but may break path | 1525 // TODO(alexmos): This works fine for regular origins but may break path |
| 1525 // matching for file URLs with OOP subframes that open popups. This should | 1526 // matching for file URLs with OOP subframes that open popups. This should |
| 1526 // be fixed by either moving this lookup to the browser process or removing | 1527 // be fixed by either moving this lookup to the browser process or removing |
| 1527 // path-based matching for file URLs from content settings. See | 1528 // path-based matching for file URLs from content settings. See |
| 1528 // https://crbug.com/466297. | 1529 // https://crbug.com/466297. |
| 1529 if (creator->top()->isWebLocalFrame()) { | 1530 if (creator->top()->isWebLocalFrame()) { |
| 1530 params->opener_top_level_frame_url = creator->top()->document().url(); | 1531 params->opener_top_level_frame_url = creator->top()->document().url(); |
| 1531 } else { | 1532 } else { |
| 1532 params->opener_top_level_frame_url = | 1533 params->opener_top_level_frame_url = |
| 1533 blink::WebStringToGURL(creator->top()->getSecurityOrigin().toString()); | 1534 url::Origin(creator->top()->getSecurityOrigin()).GetURL(); |
| 1534 } | 1535 } |
| 1535 | 1536 |
| 1536 GURL security_url(blink::WebStringToGURL( | 1537 GURL security_url( |
| 1537 creator->document().getSecurityOrigin().toString())); | 1538 url::Origin(creator->document().getSecurityOrigin()).GetURL()); |
| 1538 if (!security_url.is_valid()) | 1539 if (!security_url.is_valid()) |
| 1539 security_url = GURL(); | 1540 security_url = GURL(); |
| 1540 params->opener_security_origin = security_url; | 1541 params->opener_security_origin = security_url; |
| 1541 params->opener_suppressed = suppress_opener; | 1542 params->opener_suppressed = suppress_opener; |
| 1542 params->disposition = NavigationPolicyToDisposition(policy); | 1543 params->disposition = NavigationPolicyToDisposition(policy); |
| 1543 if (!request.isNull()) { | 1544 if (!request.isNull()) { |
| 1544 params->target_url = request.url(); | 1545 params->target_url = request.url(); |
| 1545 params->referrer = GetReferrerFromRequest(creator, request); | 1546 params->referrer = GetReferrerFromRequest(creator, request); |
| 1546 } | 1547 } |
| 1547 params->features = features; | 1548 params->features = features; |
| (...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3018 if (IsUseZoomForDSFEnabled()) { | 3019 if (IsUseZoomForDSFEnabled()) { |
| 3019 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3020 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3020 } else { | 3021 } else { |
| 3021 webview()->setDeviceScaleFactor(device_scale_factor_); | 3022 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3022 } | 3023 } |
| 3023 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3024 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3024 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3025 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3025 } | 3026 } |
| 3026 | 3027 |
| 3027 } // namespace content | 3028 } // namespace content |
| OLD | NEW |