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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2918403003: Move [Provisional]DataSource accessors/methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Added a TODO comment for user agent overrides - https://crbug.com/426555 Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/shell/test_runner/test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 8ff540e93bfe07d49b3cacacc4f1a6987ea39c47..6587d6dadaaecf2f557d45670fc27904f034a020 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3322,12 +3322,14 @@ void RenderFrameImpl::DidCreateDataSource(blink::WebLocalFrame* frame,
}
// Carry over the user agent override flag, if it exists.
+ // TODO(lukasza): https://crbug.com/426555: Need OOPIF support for propagating
+ // user agent overrides.
blink::WebView* webview = render_view_->webview();
if (content_initiated && webview && webview->MainFrame() &&
webview->MainFrame()->IsWebLocalFrame() &&
- webview->MainFrame()->DataSource()) {
- DocumentState* old_document_state =
- DocumentState::FromDataSource(webview->MainFrame()->DataSource());
+ webview->MainFrame()->ToWebLocalFrame()->DataSource()) {
+ DocumentState* old_document_state = DocumentState::FromDataSource(
+ webview->MainFrame()->ToWebLocalFrame()->DataSource());
if (old_document_state) {
InternalDocumentStateData* internal_data =
InternalDocumentStateData::FromDocumentState(document_state);
@@ -4555,10 +4557,11 @@ blink::WebString RenderFrameImpl::UserAgentOverride() {
// return early and fix properly as part of https://crbug.com/426555.
if (render_view_->webview()->MainFrame()->IsWebRemoteFrame())
return blink::WebString();
+ WebLocalFrame* main_frame =
+ render_view_->webview()->MainFrame()->ToWebLocalFrame();
// If we're in the middle of committing a load, the data source we need
// will still be provisional.
- WebFrame* main_frame = render_view_->webview()->MainFrame();
WebDataSource* data_source = NULL;
if (main_frame->ProvisionalDataSource())
data_source = main_frame->ProvisionalDataSource();
@@ -4741,7 +4744,7 @@ const RenderFrameImpl* RenderFrameImpl::GetLocalRoot() const {
// Tell the embedding application that the URL of the active page has changed.
void RenderFrameImpl::SendDidCommitProvisionalLoad(
- blink::WebFrame* frame,
+ blink::WebLocalFrame* frame,
blink::WebHistoryCommitType commit_type) {
DCHECK_EQ(frame_, frame);
WebDataSource* ds = frame->DataSource();
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/shell/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698