OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "ios/web/web_state/web_state_impl.h" | 5 #import "ios/web/web_state/web_state_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 observer.DidFinishNavigation(context.get()); | 200 observer.DidFinishNavigation(context.get()); |
201 } | 201 } |
202 | 202 |
203 void WebStateImpl::OnErrorPageNavigation(const GURL& url) { | 203 void WebStateImpl::OnErrorPageNavigation(const GURL& url) { |
204 std::unique_ptr<NavigationContext> context = | 204 std::unique_ptr<NavigationContext> context = |
205 NavigationContextImpl::CreateErrorPageNavigationContext(this, url); | 205 NavigationContextImpl::CreateErrorPageNavigationContext(this, url); |
206 for (auto& observer : observers_) | 206 for (auto& observer : observers_) |
207 observer.DidFinishNavigation(context.get()); | 207 observer.DidFinishNavigation(context.get()); |
208 } | 208 } |
209 | 209 |
| 210 void WebStateImpl::OnTitleChanged() { |
| 211 for (auto& observer : observers_) |
| 212 observer.TitleWasSet(); |
| 213 } |
| 214 |
210 void WebStateImpl::OnRenderProcessGone() { | 215 void WebStateImpl::OnRenderProcessGone() { |
211 for (auto& observer : observers_) | 216 for (auto& observer : observers_) |
212 observer.RenderProcessGone(); | 217 observer.RenderProcessGone(); |
213 } | 218 } |
214 | 219 |
215 bool WebStateImpl::OnScriptCommandReceived(const std::string& command, | 220 bool WebStateImpl::OnScriptCommandReceived(const std::string& command, |
216 const base::DictionaryValue& value, | 221 const base::DictionaryValue& value, |
217 const GURL& url, | 222 const GURL& url, |
218 bool user_is_interacting) { | 223 bool user_is_interacting) { |
219 size_t dot_position = command.find_first_of('.'); | 224 size_t dot_position = command.find_first_of('.'); |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 const LoadCommittedDetails& load_details) { | 736 const LoadCommittedDetails& load_details) { |
732 for (auto& observer : observers_) | 737 for (auto& observer : observers_) |
733 observer.NavigationItemCommitted(load_details); | 738 observer.NavigationItemCommitted(load_details); |
734 } | 739 } |
735 | 740 |
736 WebState* WebStateImpl::GetWebState() { | 741 WebState* WebStateImpl::GetWebState() { |
737 return this; | 742 return this; |
738 } | 743 } |
739 | 744 |
740 } // namespace web | 745 } // namespace web |
OLD | NEW |