| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 #include "third_party/icu/source/common/unicode/uchar.h" | 167 #include "third_party/icu/source/common/unicode/uchar.h" |
| 168 #include "third_party/icu/source/common/unicode/uscript.h" | 168 #include "third_party/icu/source/common/unicode/uscript.h" |
| 169 #include "ui/base/clipboard/clipboard.h" | 169 #include "ui/base/clipboard/clipboard.h" |
| 170 #include "ui/base/ui_base_switches_util.h" | 170 #include "ui/base/ui_base_switches_util.h" |
| 171 #include "ui/events/latency_info.h" | 171 #include "ui/events/latency_info.h" |
| 172 #include "ui/gfx/geometry/point.h" | 172 #include "ui/gfx/geometry/point.h" |
| 173 #include "ui/gfx/geometry/rect.h" | 173 #include "ui/gfx/geometry/rect.h" |
| 174 #include "ui/gfx/geometry/rect_conversions.h" | 174 #include "ui/gfx/geometry/rect_conversions.h" |
| 175 #include "ui/gfx/geometry/size_conversions.h" | 175 #include "ui/gfx/geometry/size_conversions.h" |
| 176 #include "ui/gfx/native_widget_types.h" | 176 #include "ui/gfx/native_widget_types.h" |
| 177 #include "url/url_constants.h" |
| 177 #include "v8/include/v8.h" | 178 #include "v8/include/v8.h" |
| 178 | 179 |
| 179 #if defined(OS_ANDROID) | 180 #if defined(OS_ANDROID) |
| 180 #include <cpu-features.h> | 181 #include <cpu-features.h> |
| 181 | 182 |
| 182 #include "content/renderer/android/address_detector.h" | 183 #include "content/renderer/android/address_detector.h" |
| 183 #include "content/renderer/android/content_detector.h" | 184 #include "content/renderer/android/content_detector.h" |
| 184 #include "content/renderer/android/email_detector.h" | 185 #include "content/renderer/android/email_detector.h" |
| 185 #include "content/renderer/android/phone_number_detector.h" | 186 #include "content/renderer/android/phone_number_detector.h" |
| 186 #include "ui/gfx/geometry/rect_f.h" | 187 #include "ui/gfx/geometry/rect_f.h" |
| (...skipping 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1896 if (target_url_status_ == TARGET_INFLIGHT || | 1897 if (target_url_status_ == TARGET_INFLIGHT || |
| 1897 target_url_status_ == TARGET_PENDING) { | 1898 target_url_status_ == TARGET_PENDING) { |
| 1898 // If we have a request in-flight, save the URL to be sent when we | 1899 // If we have a request in-flight, save the URL to be sent when we |
| 1899 // receive an ACK to the in-flight request. We can happily overwrite | 1900 // receive an ACK to the in-flight request. We can happily overwrite |
| 1900 // any existing pending sends. | 1901 // any existing pending sends. |
| 1901 pending_target_url_ = latest_url; | 1902 pending_target_url_ = latest_url; |
| 1902 target_url_status_ = TARGET_PENDING; | 1903 target_url_status_ = TARGET_PENDING; |
| 1903 } else { | 1904 } else { |
| 1904 // URLs larger than |kMaxURLChars| cannot be sent through IPC - | 1905 // URLs larger than |kMaxURLChars| cannot be sent through IPC - |
| 1905 // see |ParamTraits<GURL>|. | 1906 // see |ParamTraits<GURL>|. |
| 1906 if (latest_url.possibly_invalid_spec().size() > kMaxURLChars) | 1907 if (latest_url.possibly_invalid_spec().size() > url::kMaxURLChars) |
| 1907 latest_url = GURL(); | 1908 latest_url = GURL(); |
| 1908 Send(new ViewHostMsg_UpdateTargetURL(routing_id(), latest_url)); | 1909 Send(new ViewHostMsg_UpdateTargetURL(routing_id(), latest_url)); |
| 1909 target_url_ = latest_url; | 1910 target_url_ = latest_url; |
| 1910 target_url_status_ = TARGET_INFLIGHT; | 1911 target_url_status_ = TARGET_INFLIGHT; |
| 1911 } | 1912 } |
| 1912 } | 1913 } |
| 1913 | 1914 |
| 1914 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect( | 1915 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect( |
| 1915 const gfx::RectF& rect) const { | 1916 const gfx::RectF& rect) const { |
| 1916 gfx::RectF window_rect = rect; | 1917 gfx::RectF window_rect = rect; |
| (...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3548 if (IsUseZoomForDSFEnabled()) { | 3549 if (IsUseZoomForDSFEnabled()) { |
| 3549 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3550 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3550 } else { | 3551 } else { |
| 3551 webview()->setDeviceScaleFactor(device_scale_factor_); | 3552 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3552 } | 3553 } |
| 3553 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3554 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3554 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3555 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3555 } | 3556 } |
| 3556 | 3557 |
| 3557 } // namespace content | 3558 } // namespace content |
| OLD | NEW |