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

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: Comments addressed 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
« no previous file with comments | « content/public/common/common_param_traits_macros.h ('k') | webkit/glue/webpreferences.h » ('j') | 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 3309 matching lines...) Expand 10 before | Expand all | Expand 10 after
3320 document_state->set_load_type(DocumentState::RELOAD); 3320 document_state->set_load_type(DocumentState::RELOAD);
3321 else if (!params.state.empty()) 3321 else if (!params.state.empty())
3322 document_state->set_load_type(DocumentState::HISTORY_LOAD); 3322 document_state->set_load_type(DocumentState::HISTORY_LOAD);
3323 else 3323 else
3324 document_state->set_load_type(DocumentState::NORMAL_LOAD); 3324 document_state->set_load_type(DocumentState::NORMAL_LOAD);
3325 3325
3326 document_state->set_referrer_policy(params.referrer.policy); 3326 document_state->set_referrer_policy(params.referrer.policy);
3327 document_state->set_is_overriding_user_agent(params.is_overriding_user_agent); 3327 document_state->set_is_overriding_user_agent(params.is_overriding_user_agent);
3328 document_state->set_must_reset_scroll_and_scale_state( 3328 document_state->set_must_reset_scroll_and_scale_state(
3329 params.navigation_type == 3329 params.navigation_type ==
3330 ViewMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL); 3330 ViewMsg_Navigate_Type::RELOAD_ORIGINAL_REQUEST_URL);
jamesr 2013/02/21 22:38:32 if you just want to modify the behavior on page re
mnaganov (inactive) 2013/02/22 15:55:16 Thanks for pointing this out! But at this point I
3331 document_state->set_can_load_local_resources(params.can_load_local_resources); 3331 document_state->set_can_load_local_resources(params.can_load_local_resources);
3332 } 3332 }
3333 3333
3334 NavigationState* RenderViewImpl::CreateNavigationStateFromPending() { 3334 NavigationState* RenderViewImpl::CreateNavigationStateFromPending() {
3335 const ViewMsg_Navigate_Params& params = *pending_navigation_params_.get(); 3335 const ViewMsg_Navigate_Params& params = *pending_navigation_params_.get();
3336 NavigationState* navigation_state = NULL; 3336 NavigationState* navigation_state = NULL;
3337 3337
3338 // A navigation resulting from loading a javascript URL should not be treated 3338 // A navigation resulting from loading a javascript URL should not be treated
3339 // as a browser initiated event. Instead, we want it to look as if the page 3339 // as a browser initiated event. Instead, we want it to look as if the page
3340 // initiated any load resulting from JS execution. 3340 // initiated any load resulting from JS execution.
(...skipping 1984 matching lines...) Expand 10 before | Expand all | Expand 10 after
5325 webview()->dragSourceEndedAt(client_point, screen_point, op); 5325 webview()->dragSourceEndedAt(client_point, screen_point, op);
5326 } else { 5326 } else {
5327 webview()->dragSourceMovedTo(client_point, screen_point, op); 5327 webview()->dragSourceMovedTo(client_point, screen_point, op);
5328 } 5328 }
5329 } 5329 }
5330 5330
5331 void RenderViewImpl::OnDragSourceSystemDragEnded() { 5331 void RenderViewImpl::OnDragSourceSystemDragEnded() {
5332 webview()->dragSourceSystemDragEnded(); 5332 webview()->dragSourceSystemDragEnded();
5333 } 5333 }
5334 5334
5335
5335 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) { 5336 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
5337 const bool old_initialize_at_minimum_page_scale =
5338 webkit_preferences_.initialize_at_minimum_page_scale;
5336 webkit_preferences_ = prefs; 5339 webkit_preferences_ = prefs;
5337 webkit_preferences_.Apply(webview()); 5340 webkit_preferences_.Apply(webview());
5341 if (old_initialize_at_minimum_page_scale !=
5342 webkit_preferences_.initialize_at_minimum_page_scale) {
5343 webview()->resetScrollAndScaleState();
5344 }
5338 } 5345 }
5339 5346
5340 void RenderViewImpl::OnUpdateTimezone() { 5347 void RenderViewImpl::OnUpdateTimezone() {
5341 if (webview()) 5348 if (webview())
5342 NotifyTimezoneChange(webview()->mainFrame()); 5349 NotifyTimezoneChange(webview()->mainFrame());
5343 } 5350 }
5344 5351
5345 void RenderViewImpl::OnSetAltErrorPageURL(const GURL& url) { 5352 void RenderViewImpl::OnSetAltErrorPageURL(const GURL& url) {
5346 alternate_error_page_url_ = url; 5353 alternate_error_page_url_ = url;
5347 } 5354 }
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
6671 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); 6678 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle);
6672 RenderProcess::current()->ReleaseTransportDIB(dib); 6679 RenderProcess::current()->ReleaseTransportDIB(dib);
6673 } 6680 }
6674 6681
6675 void RenderViewImpl::DidCommitCompositorFrame() { 6682 void RenderViewImpl::DidCommitCompositorFrame() {
6676 RenderWidget::DidCommitCompositorFrame(); 6683 RenderWidget::DidCommitCompositorFrame();
6677 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); 6684 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame());
6678 } 6685 }
6679 6686
6680 } // namespace content 6687 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/common_param_traits_macros.h ('k') | webkit/glue/webpreferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698