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

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

Issue 2698413004: Implemented WebStateObserver::DidFinishNavigation(NavigationHandle*). (Closed)
Patch Set: Addressed review comments 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
« no previous file with comments | « ios/web/web_state/web_state_impl.h ('k') | ios/web/web_state/web_state_impl_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2a3034f272f460e3f7c54d19262ff7e67add73d9 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_context_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<NavigationContext> context =
+ NavigationContextImpl::CreateNavigationContext(this, url);
+ for (auto& observer : observers_)
+ observer.DidFinishNavigation(context.get());
}
void WebStateImpl::OnUrlHashChanged() {
@@ -198,6 +203,20 @@ void WebStateImpl::OnHistoryStateChanged() {
observer.HistoryStateChanged();
}
+void WebStateImpl::OnSamePageNavigation(const GURL& url) {
+ std::unique_ptr<NavigationContext> context =
+ NavigationContextImpl::CreateSamePageNavigationContext(this, url);
+ for (auto& observer : observers_)
+ observer.DidFinishNavigation(context.get());
+}
+
+void WebStateImpl::OnErrorPageNavigation(const GURL& url) {
+ std::unique_ptr<NavigationContext> context =
+ NavigationContextImpl::CreateErrorPageNavigationContext(this, url);
+ for (auto& observer : observers_)
+ observer.DidFinishNavigation(context.get());
+}
+
void WebStateImpl::OnRenderProcessGone() {
for (auto& observer : observers_)
observer.RenderProcessGone();
« no previous file with comments | « ios/web/web_state/web_state_impl.h ('k') | ios/web/web_state/web_state_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698