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

Unified Diff: ios/web/web_state/web_state_impl.mm

Issue 2698413004: Implemented WebStateObserver::DidFinishNavigation(NavigationHandle*). (Closed)
Patch Set: Self review Created 3 years, 10 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
Index: ios/web/web_state/web_state_impl.mm
diff --git a/ios/web/web_state/web_state_impl.mm b/ios/web/web_state/web_state_impl.mm
index c30fd510d0d55ef24b2c7bb100f33af4dd9ff8ae..8c8d116bf781dfee022c433c76c15ba6abac4e79 100644
--- a/ios/web/web_state/web_state_impl.mm
+++ b/ios/web/web_state/web_state_impl.mm
@@ -31,6 +31,7 @@
#include "ios/web/public/web_thread.h"
#include "ios/web/public/webui/web_ui_ios_controller.h"
#include "ios/web/web_state/global_web_state_event_tracker.h"
+#include "ios/web/web_state/navigation_handle_impl.h"
#import "ios/web/web_state/ui/crw_web_controller.h"
#import "ios/web/web_state/ui/crw_web_controller_container_view.h"
#include "ios/web/web_state/web_state_facade_delegate.h"
@@ -186,6 +187,10 @@ void WebStateImpl::SetFacadeDelegate(WebStateFacadeDelegate* facade_delegate) {
void WebStateImpl::OnNavigationCommitted(const GURL& url) {
UpdateHttpResponseHeaders(url);
+ std::unique_ptr<NavigationHandle> handle =
+ NavigationHandleImpl::CreateNavigationHandle(this, url);
+ for (auto& observer : observers_)
+ observer.DidFinishNavigation(handle.get());
}
void WebStateImpl::OnUrlHashChanged() {
@@ -198,6 +203,20 @@ void WebStateImpl::OnHistoryStateChanged() {
observer.HistoryStateChanged();
}
+void WebStateImpl::OnSamePageNavigation(const GURL& url) {
+ std::unique_ptr<NavigationHandle> handle =
+ NavigationHandleImpl::CreateSamePageNavigationHandle(this, url);
+ for (auto& observer : observers_)
+ observer.DidFinishNavigation(handle.get());
+}
+
+void WebStateImpl::OnErrorPageNavigation(const GURL& url) {
+ std::unique_ptr<NavigationHandle> handle =
+ NavigationHandleImpl::CreateErrorPageNavigationHandle(this, url);
+ for (auto& observer : observers_)
+ observer.DidFinishNavigation(handle.get());
+}
+
void WebStateImpl::OnRenderProcessGone() {
for (auto& observer : observers_)
observer.RenderProcessGone();

Powered by Google App Engine
This is Rietveld 408576698