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

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

Issue 12217134: [Android WebView] Implement WebSettings.{get|set}LoadWithOverviewMode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Corrections after the WebKit patch Created 7 years, 10 months 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 | Annotate | Revision Log
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/bind.h" 10 #include "base/bind.h"
(...skipping 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 // URLs larger than |kMaxURLChars| cannot be sent through IPC - 2344 // URLs larger than |kMaxURLChars| cannot be sent through IPC -
2345 // see |ParamTraits<GURL>|. 2345 // see |ParamTraits<GURL>|.
2346 if (latest_url.possibly_invalid_spec().size() > kMaxURLChars) 2346 if (latest_url.possibly_invalid_spec().size() > kMaxURLChars)
2347 latest_url = GURL(); 2347 latest_url = GURL();
2348 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, page_id_, latest_url)); 2348 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, page_id_, latest_url));
2349 target_url_ = latest_url; 2349 target_url_ = latest_url;
2350 target_url_status_ = TARGET_INFLIGHT; 2350 target_url_status_ = TARGET_INFLIGHT;
2351 } 2351 }
2352 } 2352 }
2353 2353
2354 void RenderViewImpl::WebPreferencesUpdated(const WebPreferences& old_prefs) {
2355 if (old_prefs.initialize_at_minimum_page_scale !=
2356 webkit_preferences_.initialize_at_minimum_page_scale) {
2357 webview()->resetScrollAndScaleState();
2358 }
2359 }
2360
2354 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect( 2361 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect(
2355 const gfx::RectF& rect) const { 2362 const gfx::RectF& rect) const {
2356 gfx::RectF window_rect = rect; 2363 gfx::RectF window_rect = rect;
2357 window_rect.Scale(device_scale_factor_ * webview()->pageScaleFactor()); 2364 window_rect.Scale(device_scale_factor_ * webview()->pageScaleFactor());
2358 return window_rect; 2365 return window_rect;
2359 } 2366 }
2360 2367
2361 void RenderViewImpl::StartNavStateSyncTimerIfNecessary() { 2368 void RenderViewImpl::StartNavStateSyncTimerIfNecessary() {
2362 // No need to update state if no page has committed yet. 2369 // No need to update state if no page has committed yet.
2363 if (page_id_ == -1) 2370 if (page_id_ == -1)
(...skipping 2921 matching lines...) Expand 10 before | Expand all | Expand 10 after
5285 } else { 5292 } else {
5286 webview()->dragSourceMovedTo(client_point, screen_point, op); 5293 webview()->dragSourceMovedTo(client_point, screen_point, op);
5287 } 5294 }
5288 } 5295 }
5289 5296
5290 void RenderViewImpl::OnDragSourceSystemDragEnded() { 5297 void RenderViewImpl::OnDragSourceSystemDragEnded() {
5291 webview()->dragSourceSystemDragEnded(); 5298 webview()->dragSourceSystemDragEnded();
5292 } 5299 }
5293 5300
5294 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) { 5301 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
5302 const WebPreferences old_preferences = webkit_preferences_;
5295 webkit_preferences_ = prefs; 5303 webkit_preferences_ = prefs;
5296 webkit_preferences_.Apply(webview()); 5304 webkit_preferences_.Apply(webview());
5305 WebPreferencesUpdated(old_preferences);
5297 } 5306 }
5298 5307
5299 void RenderViewImpl::OnUpdateTimezone() { 5308 void RenderViewImpl::OnUpdateTimezone() {
5300 if (webview()) 5309 if (webview())
5301 NotifyTimezoneChange(webview()->mainFrame()); 5310 NotifyTimezoneChange(webview()->mainFrame());
5302 } 5311 }
5303 5312
5304 void RenderViewImpl::OnSetAltErrorPageURL(const GURL& url) { 5313 void RenderViewImpl::OnSetAltErrorPageURL(const GURL& url) {
5305 alternate_error_page_url_ = url; 5314 alternate_error_page_url_ = url;
5306 } 5315 }
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
6618 } 6627 }
6619 #endif 6628 #endif
6620 6629
6621 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( 6630 void RenderViewImpl::OnReleaseDisambiguationPopupDIB(
6622 TransportDIB::Handle dib_handle) { 6631 TransportDIB::Handle dib_handle) {
6623 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6632 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6624 RenderProcess::current()->ReleaseTransportDIB(dib); 6633 RenderProcess::current()->ReleaseTransportDIB(dib);
6625 } 6634 }
6626 6635
6627 } // namespace content 6636 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698