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

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

Issue 1408393003: Propagate pageScaleFactor to GuestViews (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra IPC message Created 5 years, 1 month 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/public/browser/web_contents_observer.h ('k') | content/renderer/render_view_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after
2826 InternalDocumentStateData::FromDocumentState(document_state); 2826 InternalDocumentStateData::FromDocumentState(document_state);
2827 2827
2828 if (document_state->commit_load_time().is_null()) 2828 if (document_state->commit_load_time().is_null())
2829 document_state->set_commit_load_time(Time::Now()); 2829 document_state->set_commit_load_time(Time::Now());
2830 2830
2831 if (internal_data->must_reset_scroll_and_scale_state()) { 2831 if (internal_data->must_reset_scroll_and_scale_state()) {
2832 render_view_->webview()->resetScrollAndScaleState(); 2832 render_view_->webview()->resetScrollAndScaleState();
2833 internal_data->set_must_reset_scroll_and_scale_state(false); 2833 internal_data->set_must_reset_scroll_and_scale_state(false);
2834 } 2834 }
2835 2835
2836 // The browser wants to be notified of the page scale factor upon navigation.
2837 if (is_main_frame_)
Charlie Reis 2015/10/30 22:29:08 In patch 6, you had this operation inside a detail
2838 render_view_->pageScaleFactorChanged();
2839
2836 bool is_new_navigation = commit_type == blink::WebStandardCommit; 2840 bool is_new_navigation = commit_type == blink::WebStandardCommit;
2837 if (is_new_navigation) { 2841 if (is_new_navigation) {
2838 // We bump our Page ID to correspond with the new session history entry. 2842 // We bump our Page ID to correspond with the new session history entry.
2839 render_view_->page_id_ = render_view_->next_page_id_++; 2843 render_view_->page_id_ = render_view_->next_page_id_++;
2840 2844
2841 // Don't update history list values for kSwappedOutURL, since 2845 // Don't update history list values for kSwappedOutURL, since
2842 // we don't want to forget the entry that was there, and since we will 2846 // we don't want to forget the entry that was there, and since we will
2843 // never come back to kSwappedOutURL. Note that we have to call 2847 // never come back to kSwappedOutURL. Note that we have to call
2844 // SendUpdateState and update page_id_ even in this case, so that 2848 // SendUpdateState and update page_id_ even in this case, so that
2845 // the current entry gets a state update and so that we don't send a 2849 // the current entry gets a state update and so that we don't send a
(...skipping 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after
5287 mojo::ServiceProviderPtr service_provider; 5291 mojo::ServiceProviderPtr service_provider;
5288 mojo::URLRequestPtr request(mojo::URLRequest::New()); 5292 mojo::URLRequestPtr request(mojo::URLRequest::New());
5289 request->url = mojo::String::From(url); 5293 request->url = mojo::String::From(url);
5290 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), 5294 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider),
5291 nullptr, nullptr, 5295 nullptr, nullptr,
5292 base::Bind(&OnGotContentHandlerID)); 5296 base::Bind(&OnGotContentHandlerID));
5293 return service_provider.Pass(); 5297 return service_provider.Pass();
5294 } 5298 }
5295 5299
5296 } // namespace content 5300 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_observer.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698