Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1497743005: Allow huge data: URIs only via WebView.loadDataWithBaseUrl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the test Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 1873
1875 // Tell the browser to display a destination link. 1874 // Tell the browser to display a destination link.
1876 if (target_url_status_ == TARGET_INFLIGHT || 1875 if (target_url_status_ == TARGET_INFLIGHT ||
1877 target_url_status_ == TARGET_PENDING) { 1876 target_url_status_ == TARGET_PENDING) {
1878 // If we have a request in-flight, save the URL to be sent when we 1877 // If we have a request in-flight, save the URL to be sent when we
1879 // receive an ACK to the in-flight request. We can happily overwrite 1878 // receive an ACK to the in-flight request. We can happily overwrite
1880 // any existing pending sends. 1879 // any existing pending sends.
1881 pending_target_url_ = latest_url; 1880 pending_target_url_ = latest_url;
1882 target_url_status_ = TARGET_PENDING; 1881 target_url_status_ = TARGET_PENDING;
1883 } else { 1882 } else {
1884 // URLs larger than |MaxURLChars()| cannot be sent through IPC - 1883 // URLs larger than |kMaxURLChars| cannot be sent through IPC -
1885 // see |ParamTraits<GURL>|. 1884 // see |ParamTraits<GURL>|.
1886 if (latest_url.possibly_invalid_spec().size() > GetMaxURLChars()) 1885 if (latest_url.possibly_invalid_spec().size() > kMaxURLChars)
1887 latest_url = GURL(); 1886 latest_url = GURL();
1888 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, latest_url)); 1887 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, latest_url));
1889 target_url_ = latest_url; 1888 target_url_ = latest_url;
1890 target_url_status_ = TARGET_INFLIGHT; 1889 target_url_status_ = TARGET_INFLIGHT;
1891 } 1890 }
1892 } 1891 }
1893 1892
1894 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect( 1893 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect(
1895 const gfx::RectF& rect) const { 1894 const gfx::RectF& rect) const {
1896 gfx::RectF window_rect = rect; 1895 gfx::RectF window_rect = rect;
(...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after
3728 if (IsUseZoomForDSFEnabled()) { 3727 if (IsUseZoomForDSFEnabled()) {
3729 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_); 3728 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_);
3730 webview()->setZoomFactorForDeviceScaleFactor( 3729 webview()->setZoomFactorForDeviceScaleFactor(
3731 device_scale_factor_); 3730 device_scale_factor_);
3732 } else { 3731 } else {
3733 webview()->setDeviceScaleFactor(device_scale_factor_); 3732 webview()->setDeviceScaleFactor(device_scale_factor_);
3734 } 3733 }
3735 } 3734 }
3736 3735
3737 } // namespace content 3736 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698