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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #include "content/public/common/drop_data.h" | 57 #include "content/public/common/drop_data.h" |
58 #include "content/public/common/favicon_url.h" | 58 #include "content/public/common/favicon_url.h" |
59 #include "content/public/common/file_chooser_file_info.h" | 59 #include "content/public/common/file_chooser_file_info.h" |
60 #include "content/public/common/file_chooser_params.h" | 60 #include "content/public/common/file_chooser_params.h" |
61 #include "content/public/common/page_importance_signals.h" | 61 #include "content/public/common/page_importance_signals.h" |
62 #include "content/public/common/page_state.h" | 62 #include "content/public/common/page_state.h" |
63 #include "content/public/common/page_zoom.h" | 63 #include "content/public/common/page_zoom.h" |
64 #include "content/public/common/ssl_status.h" | 64 #include "content/public/common/ssl_status.h" |
65 #include "content/public/common/three_d_api_types.h" | 65 #include "content/public/common/three_d_api_types.h" |
66 #include "content/public/common/url_constants.h" | 66 #include "content/public/common/url_constants.h" |
67 #include "content/public/common/url_utils.h" | |
68 #include "content/public/common/web_preferences.h" | 67 #include "content/public/common/web_preferences.h" |
69 #include "content/public/renderer/content_renderer_client.h" | 68 #include "content/public/renderer/content_renderer_client.h" |
70 #include "content/public/renderer/document_state.h" | 69 #include "content/public/renderer/document_state.h" |
71 #include "content/public/renderer/navigation_state.h" | 70 #include "content/public/renderer/navigation_state.h" |
72 #include "content/public/renderer/render_view_observer.h" | 71 #include "content/public/renderer/render_view_observer.h" |
73 #include "content/public/renderer/render_view_visitor.h" | 72 #include "content/public/renderer/render_view_visitor.h" |
74 #include "content/renderer/browser_plugin/browser_plugin.h" | 73 #include "content/renderer/browser_plugin/browser_plugin.h" |
75 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 74 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
76 #include "content/renderer/disambiguation_popup_helper.h" | 75 #include "content/renderer/disambiguation_popup_helper.h" |
77 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 76 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
(...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1826 | 1825 |
1827 // Tell the browser to display a destination link. | 1826 // Tell the browser to display a destination link. |
1828 if (target_url_status_ == TARGET_INFLIGHT || | 1827 if (target_url_status_ == TARGET_INFLIGHT || |
1829 target_url_status_ == TARGET_PENDING) { | 1828 target_url_status_ == TARGET_PENDING) { |
1830 // If we have a request in-flight, save the URL to be sent when we | 1829 // If we have a request in-flight, save the URL to be sent when we |
1831 // receive an ACK to the in-flight request. We can happily overwrite | 1830 // receive an ACK to the in-flight request. We can happily overwrite |
1832 // any existing pending sends. | 1831 // any existing pending sends. |
1833 pending_target_url_ = latest_url; | 1832 pending_target_url_ = latest_url; |
1834 target_url_status_ = TARGET_PENDING; | 1833 target_url_status_ = TARGET_PENDING; |
1835 } else { | 1834 } else { |
1836 // URLs larger than |MaxURLChars()| cannot be sent through IPC - | 1835 // URLs larger than |kMaxURLChars| cannot be sent through IPC - |
1837 // see |ParamTraits<GURL>|. | 1836 // see |ParamTraits<GURL>|. |
1838 if (latest_url.possibly_invalid_spec().size() > GetMaxURLChars()) | 1837 if (latest_url.possibly_invalid_spec().size() > kMaxURLChars) |
1839 latest_url = GURL(); | 1838 latest_url = GURL(); |
1840 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, latest_url)); | 1839 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, latest_url)); |
1841 target_url_ = latest_url; | 1840 target_url_ = latest_url; |
1842 target_url_status_ = TARGET_INFLIGHT; | 1841 target_url_status_ = TARGET_INFLIGHT; |
1843 } | 1842 } |
1844 } | 1843 } |
1845 | 1844 |
1846 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect( | 1845 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect( |
1847 const gfx::RectF& rect) const { | 1846 const gfx::RectF& rect) const { |
1848 gfx::RectF window_rect = rect; | 1847 gfx::RectF window_rect = rect; |
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3710 if (IsUseZoomForDSFEnabled()) { | 3709 if (IsUseZoomForDSFEnabled()) { |
3711 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_); | 3710 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_); |
3712 webview()->setZoomFactorForDeviceScaleFactor( | 3711 webview()->setZoomFactorForDeviceScaleFactor( |
3713 device_scale_factor_); | 3712 device_scale_factor_); |
3714 } else { | 3713 } else { |
3715 webview()->setDeviceScaleFactor(device_scale_factor_); | 3714 webview()->setDeviceScaleFactor(device_scale_factor_); |
3716 } | 3715 } |
3717 } | 3716 } |
3718 | 3717 |
3719 } // namespace content | 3718 } // namespace content |
OLD | NEW |