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

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: Fixed typo in comment 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 2347 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 // URLs larger than |kMaxURLChars| cannot be sent through IPC - 2358 // URLs larger than |kMaxURLChars| cannot be sent through IPC -
2359 // see |ParamTraits<GURL>|. 2359 // see |ParamTraits<GURL>|.
2360 if (latest_url.possibly_invalid_spec().size() > kMaxURLChars) 2360 if (latest_url.possibly_invalid_spec().size() > kMaxURLChars)
2361 latest_url = GURL(); 2361 latest_url = GURL();
2362 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, page_id_, latest_url)); 2362 Send(new ViewHostMsg_UpdateTargetURL(routing_id_, page_id_, latest_url));
2363 target_url_ = latest_url; 2363 target_url_ = latest_url;
2364 target_url_status_ = TARGET_INFLIGHT; 2364 target_url_status_ = TARGET_INFLIGHT;
2365 } 2365 }
2366 } 2366 }
2367 2367
2368 void RenderViewImpl::WebPreferencesUpdated(const WebPreferences& old_prefs) {
jamesr 2013/02/19 23:26:21 I'd rather just do this inline in OnUpdateWebPrefe
mnaganov (inactive) 2013/02/20 10:36:49 This setting resides in WebPreferences because it'
2369 if (old_prefs.initialize_at_minimum_page_scale !=
2370 webkit_preferences_.initialize_at_minimum_page_scale) {
2371 webview()->resetScrollAndScaleState();
2372 }
2373 }
2374
2368 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect( 2375 gfx::RectF RenderViewImpl::ClientRectToPhysicalWindowRect(
2369 const gfx::RectF& rect) const { 2376 const gfx::RectF& rect) const {
2370 gfx::RectF window_rect = rect; 2377 gfx::RectF window_rect = rect;
2371 window_rect.Scale(device_scale_factor_ * webview()->pageScaleFactor()); 2378 window_rect.Scale(device_scale_factor_ * webview()->pageScaleFactor());
2372 return window_rect; 2379 return window_rect;
2373 } 2380 }
2374 2381
2375 void RenderViewImpl::StartNavStateSyncTimerIfNecessary() { 2382 void RenderViewImpl::StartNavStateSyncTimerIfNecessary() {
2376 // No need to update state if no page has committed yet. 2383 // No need to update state if no page has committed yet.
2377 if (page_id_ == -1) 2384 if (page_id_ == -1)
(...skipping 2926 matching lines...) Expand 10 before | Expand all | Expand 10 after
5304 } else { 5311 } else {
5305 webview()->dragSourceMovedTo(client_point, screen_point, op); 5312 webview()->dragSourceMovedTo(client_point, screen_point, op);
5306 } 5313 }
5307 } 5314 }
5308 5315
5309 void RenderViewImpl::OnDragSourceSystemDragEnded() { 5316 void RenderViewImpl::OnDragSourceSystemDragEnded() {
5310 webview()->dragSourceSystemDragEnded(); 5317 webview()->dragSourceSystemDragEnded();
5311 } 5318 }
5312 5319
5313 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) { 5320 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
5321 const WebPreferences old_preferences = webkit_preferences_;
5314 webkit_preferences_ = prefs; 5322 webkit_preferences_ = prefs;
5315 webkit_preferences_.Apply(webview()); 5323 webkit_preferences_.Apply(webview());
5324 WebPreferencesUpdated(old_preferences);
5316 } 5325 }
5317 5326
5318 void RenderViewImpl::OnUpdateTimezone() { 5327 void RenderViewImpl::OnUpdateTimezone() {
5319 if (webview()) 5328 if (webview())
5320 NotifyTimezoneChange(webview()->mainFrame()); 5329 NotifyTimezoneChange(webview()->mainFrame());
5321 } 5330 }
5322 5331
5323 void RenderViewImpl::OnSetAltErrorPageURL(const GURL& url) { 5332 void RenderViewImpl::OnSetAltErrorPageURL(const GURL& url) {
5324 alternate_error_page_url_ = url; 5333 alternate_error_page_url_ = url;
5325 } 5334 }
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
6649 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6658 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6650 RenderProcess::current()->ReleaseTransportDIB(dib); 6659 RenderProcess::current()->ReleaseTransportDIB(dib);
6651 } 6660 }
6652 6661
6653 void RenderViewImpl::DidCommitCompositorFrame() { 6662 void RenderViewImpl::DidCommitCompositorFrame() {
6654 RenderWidget::DidCommitCompositorFrame(); 6663 RenderWidget::DidCommitCompositorFrame();
6655 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); 6664 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame());
6656 } 6665 }
6657 6666
6658 } // namespace content 6667 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698