| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 void WebStateImpl::OnUrlHashChanged() { | 172 void WebStateImpl::OnUrlHashChanged() { |
| 173 for (auto& observer : observers_) | 173 for (auto& observer : observers_) |
| 174 observer.UrlHashChanged(); | 174 observer.UrlHashChanged(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 void WebStateImpl::OnHistoryStateChanged() { | 177 void WebStateImpl::OnHistoryStateChanged() { |
| 178 for (auto& observer : observers_) | 178 for (auto& observer : observers_) |
| 179 observer.HistoryStateChanged(); | 179 observer.HistoryStateChanged(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void WebStateImpl::OnRenderProcessGone() { |
| 183 for (auto& observer : observers_) |
| 184 observer.RenderProcessGone(); |
| 185 } |
| 186 |
| 182 bool WebStateImpl::OnScriptCommandReceived(const std::string& command, | 187 bool WebStateImpl::OnScriptCommandReceived(const std::string& command, |
| 183 const base::DictionaryValue& value, | 188 const base::DictionaryValue& value, |
| 184 const GURL& url, | 189 const GURL& url, |
| 185 bool user_is_interacting) { | 190 bool user_is_interacting) { |
| 186 size_t dot_position = command.find_first_of('.'); | 191 size_t dot_position = command.find_first_of('.'); |
| 187 if (dot_position == 0 || dot_position == std::string::npos) | 192 if (dot_position == 0 || dot_position == std::string::npos) |
| 188 return false; | 193 return false; |
| 189 | 194 |
| 190 std::string prefix = command.substr(0, dot_position); | 195 std::string prefix = command.substr(0, dot_position); |
| 191 auto it = script_command_callbacks_.find(prefix); | 196 auto it = script_command_callbacks_.find(prefix); |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 const LoadCommittedDetails& load_details) { | 739 const LoadCommittedDetails& load_details) { |
| 735 for (auto& observer : observers_) | 740 for (auto& observer : observers_) |
| 736 observer.NavigationItemCommitted(load_details); | 741 observer.NavigationItemCommitted(load_details); |
| 737 } | 742 } |
| 738 | 743 |
| 739 WebState* WebStateImpl::GetWebState() { | 744 WebState* WebStateImpl::GetWebState() { |
| 740 return this; | 745 return this; |
| 741 } | 746 } |
| 742 | 747 |
| 743 } // namespace web | 748 } // namespace web |
| OLD | NEW |