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

Unified Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 99283: Add a BeforeDestroyFrame notification method to WebViewDelegate (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « webkit/glue/webframe_impl.cc ('k') | webkit/glue/webplugin_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframeloaderclient_impl.cc
===================================================================
--- webkit/glue/webframeloaderclient_impl.cc (revision 15231)
+++ webkit/glue/webframeloaderclient_impl.cc (working copy)
@@ -100,14 +100,14 @@
}
void WebFrameLoaderClient::windowObjectCleared() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->WindowObjectCleared(webframe_);
}
void WebFrameLoaderClient::documentElementAvailable() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DocumentElementAvailable(webframe_);
@@ -120,14 +120,14 @@
}
bool WebFrameLoaderClient::hasWebView() const {
- return webframe_->webview_impl() != NULL;
+ return webframe_->GetWebViewImpl() != NULL;
}
bool WebFrameLoaderClient::hasFrameView() const {
// The Mac port has this notion of a WebFrameView, which seems to be
// some wrapper around an NSView. Since our equivalent is HWND, I guess
// we have a "frameview" whenever we have the toplevel HWND.
- return webframe_->webview_impl() != NULL;
+ return webframe_->GetWebViewImpl() != NULL;
}
void WebFrameLoaderClient::makeDocumentView() {
@@ -170,7 +170,7 @@
void WebFrameLoaderClient::assignIdentifierToInitialRequest(
unsigned long identifier, DocumentLoader* loader,
const ResourceRequest& request) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d) {
WebRequestImpl webreq(request);
@@ -230,7 +230,7 @@
request.setMainDocumentURL(KURL("about:blank"));
// Give the delegate a crack at the request.
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d) {
WebRequestImpl webreq(request);
@@ -338,7 +338,7 @@
webframe_->frame(), loader, url));
}
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidFinishLoading(webview, identifier);
@@ -350,7 +350,7 @@
}
GURL WebFrameLoaderClient::GetAlt404PageUrl(DocumentLoader* loader) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (!d)
return GURL();
@@ -383,7 +383,7 @@
void WebFrameLoaderClient::dispatchDidFailLoading(DocumentLoader* loader,
unsigned long identifier,
const ResourceError& error) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
if (webview && webview->delegate()) {
webview->delegate()->DidFailLoadingWithError(webview, identifier,
WebErrorImpl(error));
@@ -395,7 +395,7 @@
}
void WebFrameLoaderClient::dispatchDidFinishDocumentLoad() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
DocumentLoader* documentLoader =
webframe_->frame()->loader()->activeDocumentLoader();
@@ -445,7 +445,7 @@
const ResourceRequest& request,
const ResourceResponse& response,
int length) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
bool result = false;
@@ -483,7 +483,7 @@
// LayoutTests/fast/dom/replaceChild.html
if (!webframe_->frame()->page())
return;
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidHandleOnloadEventsForFrame(webview, webframe_);
@@ -587,7 +587,7 @@
ds->AppendRedirect(ds->GetRequest().GetURL());
// Dispatch callback
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidReceiveProvisionalLoadServerRedirect(webview, webframe_);
@@ -596,7 +596,7 @@
// Called on both success and failure of a client redirect.
void WebFrameLoaderClient::dispatchDidCancelClientRedirect() {
// No longer expecting a client redirect.
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview ? webview->delegate() : NULL;
if (d) {
expected_client_redirect_src_ = GURL();
@@ -614,7 +614,7 @@
double fire_date) {
// Tells dispatchDidStartProvisionalLoad that if it sees this item it is a
// redirect and the source item should be added as the start of the chain.
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview ? webview->delegate() : NULL;
if (d) {
expected_client_redirect_src_ = webframe_->GetURL();
@@ -644,7 +644,7 @@
void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage() {
// Anchor fragment navigations are not normal loads, so we need to synthesize
// some events for our delegate.
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidStartLoading(webview);
@@ -702,7 +702,7 @@
}
void WebFrameLoaderClient::dispatchWillClose() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
// Make sure WebViewImpl releases the references it uses to restore focus.
// If we didn't do this, WebViewImpl might try to restore focus to an invalid
// element.
@@ -713,7 +713,7 @@
}
void WebFrameLoaderClient::dispatchDidReceiveIcon() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->DidReceiveIconForFrame(webview, webframe_);
@@ -736,7 +736,7 @@
// any redirects yet.
DCHECK(ds->GetRedirectChain().empty());
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
// If this load is what we expected from a client redirect, treat it as a
// redirect from that original page. The expected redirect urls will be
@@ -797,7 +797,7 @@
}
void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d) {
d->DidReceiveTitle(webview, webkit_glue::StringToStdWString(title),
@@ -808,7 +808,7 @@
void WebFrameLoaderClient::dispatchDidCommitLoad() {
webframe_->SelectAppCacheWithoutManifest();
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
bool is_new_navigation;
webview->DidCommitLoad(&is_new_navigation);
WebViewDelegate* d = webview->delegate();
@@ -853,7 +853,7 @@
webframe_->frame()->loader()->activeDocumentLoader();
WebDataSourceImpl* dataSource =
WebDataSourceImpl::FromLoader(documentLoader);
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
dataSource->set_finish_load_time(base::Time::Now());
if (d)
@@ -905,7 +905,7 @@
}
void WebFrameLoaderClient::dispatchShow() {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (d)
d->Show(webview, webview->window_open_disposition());
@@ -1004,7 +1004,7 @@
PassRefPtr<WebCore::FormState> form_state) {
PolicyAction policy_action = PolicyUse;
- WebViewImpl* wv = webframe_->webview_impl();
+ WebViewImpl* wv = webframe_->GetWebViewImpl();
WebViewDelegate* d = wv->delegate();
// It is valid for this function to be invoked in code paths where the
// the webview is closed.
@@ -1037,7 +1037,7 @@
GURL referrer = webkit_glue::StringToGURL(
request.httpHeaderField("Referer"));
- d->OpenURL(webframe_->webview_impl(),
+ d->OpenURL(webframe_->GetWebViewImpl(),
webkit_glue::KURLToGURL(request.url()),
referrer,
disposition);
@@ -1075,7 +1075,7 @@
// Don't free the PasswordFormData, the datasource will do that.
ds->set_password_form_data(pass_data);
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
// Unless autocomplete=off, record what the user put in it for future
@@ -1114,9 +1114,10 @@
void WebFrameLoaderClient::postProgressStartedNotification() {
if (hasWebView()) {
- WebViewDelegate* d = webframe_->webview_impl()->delegate();
+ WebViewImpl* web_view = webframe_->GetWebViewImpl();
+ WebViewDelegate* d = web_view->delegate();
if (d)
- d->DidStartLoading(webframe_->webview_impl());
+ d->DidStartLoading(web_view);
}
}
@@ -1128,15 +1129,15 @@
// TODO(ericroman): why might webframe_->webview_impl be null?
// http://b/1234461
if (hasWebView()) {
- WebViewDelegate* d = webframe_->webview_impl()->delegate();
-
+ WebViewImpl* web_view = webframe_->GetWebViewImpl();
+ WebViewDelegate* d = web_view->delegate();
if (d)
- d->DidStopLoading(webframe_->webview_impl());
+ d->DidStopLoading(web_view);
}
}
void WebFrameLoaderClient::setMainFrameDocumentReady(bool ready) {
- WebViewImpl* web_view = webframe_->webview_impl();
+ WebViewImpl* web_view = webframe_->GetWebViewImpl();
if (!web_view)
return;
WebDevToolsAgentImpl* tools_agent = web_view->GetWebDevToolsAgentImpl();
@@ -1151,7 +1152,7 @@
// Creates a new connection and begins downloading from that (contrast this
// with |download|).
void WebFrameLoaderClient::startDownload(const ResourceRequest& request) {
- WebViewDelegate* d = webframe_->webview_impl()->delegate();
+ WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate();
if (d) {
const GURL url(webkit_glue::KURLToGURL(request.url()));
const GURL referrer(webkit_glue::StringToStdString(request.httpReferrer()));
@@ -1357,7 +1358,7 @@
//
// e.g.:
// WebHistoryItem* item =
- // webframe_->webview_impl()->GetBackForwardList()->GetCurrentItem();
+ // webframe_->GetWebViewImpl()->GetBackForwardList()->GetCurrentItem();
// WebHistoryItemImpl* item_impl = static_cast<WebHistoryItemImpl*>(item);
//
// item_impl->SetTitle(webkit_glue::StringToStdWString(title));
@@ -1440,7 +1441,7 @@
const Vector<String>& param_values,
const String& mime_type,
bool load_manually) {
- WebViewImpl* webview = webframe_->webview_impl();
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
WebViewDelegate* d = webview->delegate();
if (!d)
return NULL;
@@ -1500,7 +1501,7 @@
std::string actual_mime_type;
WebPluginDelegate* plugin_delegate =
- d->CreatePluginDelegate(webframe_->webview_impl(), gurl, my_mime_type,
+ d->CreatePluginDelegate(webframe_->GetWebViewImpl(), gurl, my_mime_type,
combined_clsid, &actual_mime_type);
if (!plugin_delegate)
return NULL;
@@ -1636,7 +1637,7 @@
}
NetAgentImpl* WebFrameLoaderClient::GetNetAgentImpl() {
- WebViewImpl* web_view = webframe_->webview_impl();
+ WebViewImpl* web_view = webframe_->GetWebViewImpl();
if (!web_view) {
return NULL;
}
« no previous file with comments | « webkit/glue/webframe_impl.cc ('k') | webkit/glue/webplugin_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698