Index: content/renderer/render_view.cc |
=================================================================== |
--- content/renderer/render_view.cc (revision 90236) |
+++ content/renderer/render_view.cc (working copy) |
@@ -543,8 +543,8 @@ |
bool found; |
std::string mime_type; |
Send(new ViewHostMsg_GetPluginInfo( |
- routing_id_, params.url, frame->top()->url(), params.mimeType.utf8(), |
- &found, &info, &mime_type)); |
+ routing_id_, params.url, frame->top()->document().url(), |
+ params.mimeType.utf8(), &found, &info, &mime_type)); |
if (!found || !webkit::npapi::IsPluginEnabled(info)) |
return NULL; |
@@ -583,7 +583,7 @@ |
bool RenderView::OnMessageReceived(const IPC::Message& message) { |
WebFrame* main_frame = webview() ? webview()->mainFrame() : NULL; |
if (main_frame) |
- content::GetContentClient()->SetActiveURL(main_frame->url()); |
+ content::GetContentClient()->SetActiveURL(main_frame->document().url()); |
ObserverListBase<RenderViewObserver>::Iterator it(observers_); |
RenderViewObserver* observer; |
@@ -1263,8 +1263,9 @@ |
params.session_storage_namespace_id = session_storage_namespace_id_; |
params.frame_name = frame_name; |
params.opener_frame_id = creator->identifier(); |
- params.opener_url = creator->url(); |
- params.opener_security_origin = creator->securityOrigin().toString().utf8(); |
+ params.opener_url = creator->document().url(); |
+ params.opener_security_origin = |
+ creator->document().securityOrigin().toString().utf8(); |
if (!request.isNull()) |
params.target_url = request.url(); |
@@ -1295,7 +1296,7 @@ |
view->opener_suppressed_ = opener_suppressed; |
// Record the security origin of the creator. |
- GURL creator_url(creator->securityOrigin().toString().utf8()); |
+ GURL creator_url(creator->document().securityOrigin().toString().utf8()); |
if (!creator_url.is_valid() || !creator_url.IsStandard()) |
creator_url = GURL(); |
view->creator_url_ = creator_url; |
@@ -1335,7 +1336,7 @@ |
webkit::ppapi::PluginInstance* plugin) { |
GURL active_url; |
if (webview() && webview()->mainFrame()) |
- active_url = GURL(webview()->mainFrame()->url()); |
+ active_url = GURL(webview()->mainFrame()->document().url()); |
RenderWidgetFullscreenPepper* widget = RenderWidgetFullscreenPepper::Create( |
routing_id_, render_thread_, plugin, active_url); |
widget->show(WebKit::WebNavigationPolicyIgnore); |
@@ -1572,7 +1573,7 @@ |
RunJavaScriptMessage(ui::MessageBoxFlags::kIsJavascriptAlert, |
message, |
string16(), |
- frame->url(), |
+ frame->document().url(), |
NULL); |
} |
@@ -1581,7 +1582,7 @@ |
return RunJavaScriptMessage(ui::MessageBoxFlags::kIsJavascriptConfirm, |
message, |
string16(), |
- frame->url(), |
+ frame->document().url(), |
NULL); |
} |
@@ -1592,7 +1593,7 @@ |
bool ok = RunJavaScriptMessage(ui::MessageBoxFlags::kIsJavascriptPrompt, |
message, |
default_value, |
- frame->url(), |
+ frame->document().url(), |
&result); |
if (ok) |
actual_value->assign(result); |
@@ -1612,7 +1613,8 @@ |
// response as RunJavaScriptMessage. |
string16 ignored_result; |
SendAndRunNestedMessageLoop(new ViewHostMsg_RunBeforeUnloadConfirm( |
- routing_id_, frame->url(), message, &success, &ignored_result)); |
+ routing_id_, frame->document().url(), message, |
+ &success, &ignored_result)); |
return success; |
} |
@@ -1977,7 +1979,7 @@ |
return WebKit::WebNavigationPolicyIgnore; // Suppress the load here. |
} |
- GURL old_url(frame->url()); |
+ GURL old_url(frame->document().url()); |
// Detect when we're crossing a permission-based boundary (e.g. into or out of |
// an extension or app origin, leaving a WebUI page, etc). We only care about |
@@ -2061,7 +2063,7 @@ |
bool is_noreferrer_and_blank_target = |
// Frame should be top level and not yet navigated. |
frame->parent() == NULL && |
- frame->url().isEmpty() && |
+ frame->document().url().isEmpty() && |
historyBackListCount() < 1 && |
historyForwardListCount() < 1 && |
// Links with rel=noreferrer will have no Referer field, and their |
@@ -2434,7 +2436,7 @@ |
FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
DidClearWindowObject(frame)); |
- GURL frame_url = frame->url(); |
+ GURL frame_url = frame->document().url(); |
if (BindingsPolicy::is_web_ui_enabled(enabled_bindings_) && |
(frame_url.SchemeIs(chrome::kChromeUIScheme) || |
frame_url.SchemeIs(chrome::kDataScheme))) { |
@@ -2446,7 +2448,7 @@ |
void RenderView::didCreateDocumentElement(WebFrame* frame) { |
// Notify the browser about non-blank documents loading in the top frame. |
- GURL url = frame->url(); |
+ GURL url = frame->document().url(); |
if (url.is_valid() && url.spec() != chrome::kAboutBlankURL) { |
if (frame == webview()->mainFrame()) |
Send(new ViewHostMsg_DocumentAvailableInMainFrame(routing_id_)); |
@@ -2630,14 +2632,15 @@ |
int http_status_code = navigation_state->http_status_code(); |
if (http_status_code == 404) { |
// On 404s, try a remote search page as a fallback. |
- const GURL& frame_url = frame->url(); |
+ const GURL& document_url = frame->document().url(); |
- const GURL& error_page_url = GetAlternateErrorPageURL(frame_url, HTTP_404); |
+ const GURL& error_page_url = |
+ GetAlternateErrorPageURL(document_url, HTTP_404); |
if (error_page_url.is_valid()) { |
WebURLError original_error; |
original_error.domain = "http"; |
original_error.reason = 404; |
- original_error.unreachableURL = frame_url; |
+ original_error.unreachableURL = document_url; |
navigation_state->set_alt_error_page_fetcher( |
new AltErrorPageResourceFetcher( |
@@ -2794,7 +2797,7 @@ |
WebFileSystemCallbacks* callbacks) { |
DCHECK(callbacks); |
- WebSecurityOrigin origin = frame->securityOrigin(); |
+ WebSecurityOrigin origin = frame->document().securityOrigin(); |
if (origin.isEmpty()) { |
// Uninitialized document? |
callbacks->didFail(WebKit::WebFileErrorAbort); |
@@ -2811,7 +2814,7 @@ |
WebStorageQuotaType type, |
WebStorageQuotaCallbacks* callbacks) { |
DCHECK(frame); |
- WebSecurityOrigin origin = frame->securityOrigin(); |
+ WebSecurityOrigin origin = frame->document().securityOrigin(); |
if (origin.isEmpty()) { |
// Uninitialized document? |
callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); |
@@ -2827,7 +2830,7 @@ |
unsigned long long requested_size, |
WebStorageQuotaCallbacks* callbacks) { |
DCHECK(frame); |
- WebSecurityOrigin origin = frame->securityOrigin(); |
+ WebSecurityOrigin origin = frame->document().securityOrigin(); |
if (origin.isEmpty()) { |
// Uninitialized document? |
callbacks->didFail(WebKit::WebStorageQuotaErrorAbort); |
@@ -3306,11 +3309,12 @@ |
void RenderView::OnCSSInsertRequest(const std::wstring& frame_xpath, |
const std::string& css, |
const std::string& id) { |
- WebFrame* web_frame = GetChildFrame(frame_xpath); |
- if (!web_frame) |
+ WebFrame* frame = GetChildFrame(frame_xpath); |
+ if (!frame) |
return; |
- web_frame->insertStyleText(WebString::fromUTF8(css), WebString::fromUTF8(id)); |
+ frame->document().insertStyleText(WebString::fromUTF8(css), |
+ WebString::fromUTF8(id)); |
} |
void RenderView::OnAllowBindings(int enabled_bindings_flags) { |
@@ -4140,7 +4144,7 @@ |
// saved values if necessary |
Send(new ViewHostMsg_DidZoomURL( |
routing_id_, webview()->zoomLevel(), remember, |
- GURL(webview()->mainFrame()->url()))); |
+ GURL(webview()->mainFrame()->document().url()))); |
} |
void RenderView::registerProtocolHandler(const WebString& scheme, |
@@ -4199,7 +4203,7 @@ |
if (!opener) { |
return true; |
} else { |
- if (url.GetOrigin() != GURL(opener->url()).GetOrigin()) |
+ if (url.GetOrigin() != GURL(opener->document().url()).GetOrigin()) |
return true; |
} |
} |