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

Unified Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 196128: Hook up WebViewClient, part 1.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/dragclient_impl.cc ('k') | webkit/glue/webview_delegate.h » ('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 26230)
+++ webkit/glue/webframeloaderclient_impl.cc (working copy)
@@ -504,9 +504,8 @@
// Anchor fragment navigations are not normal loads, so we need to synthesize
// some events for our delegate.
WebViewImpl* webview = webframe_->GetWebViewImpl();
- WebViewDelegate* d = webview->delegate();
- if (d)
- d->DidStartLoading(webview);
+ if (webview->client())
+ webview->client()->didStartLoading();
WebDataSourceImpl* ds = webframe_->GetDataSourceImpl();
DCHECK(ds) << "DataSource NULL when navigating to reference fragment";
@@ -550,8 +549,8 @@
webframe_, is_new_navigation);
}
- if (d)
- d->DidStopLoading(webview);
+ if (webview->client())
+ webview->client()->didStopLoading();
}
void WebFrameLoaderClient::dispatchWillClose() {
@@ -885,12 +884,9 @@
}
void WebFrameLoaderClient::postProgressStartedNotification() {
- if (hasWebView()) {
- WebViewImpl* web_view = webframe_->GetWebViewImpl();
- WebViewDelegate* d = web_view->delegate();
- if (d)
- d->DidStartLoading(web_view);
- }
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
+ if (webview && webview->client())
+ webview->client()->didStartLoading();
}
void WebFrameLoaderClient::postProgressEstimateChangedNotification() {
@@ -898,14 +894,11 @@
}
void WebFrameLoaderClient::postProgressFinishedNotification() {
- // TODO(ericroman): why might webframe_->webview_impl be null?
+ // TODO(ericroman): why might the webview be null?
// http://b/1234461
- if (hasWebView()) {
- WebViewImpl* web_view = webframe_->GetWebViewImpl();
- WebViewDelegate* d = web_view->delegate();
- if (d)
- d->DidStopLoading(web_view);
- }
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
+ if (webview && webview->client())
+ webview->client()->didStopLoading();
}
void WebFrameLoaderClient::setMainFrameDocumentReady(bool ready) {
@@ -1335,9 +1328,9 @@
if (!StringToInt(offset_str, &offset))
return;
- WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate();
- if (d)
- d->NavigateBackForwardSoon(offset);
+ WebViewImpl* webview = webframe_->GetWebViewImpl();
+ if (webview->client())
+ webview->client()->navigateBackForwardSoon(offset);
}
PassOwnPtr<WebPluginLoadObserver> WebFrameLoaderClient::GetPluginLoadObserver() {
« no previous file with comments | « webkit/glue/dragclient_impl.cc ('k') | webkit/glue/webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698