| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "ios/web/public/test/fakes/test_web_state_observer.h" | 5 #include "ios/web/public/test/fakes/test_web_state_observer.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "ios/web/public/web_state/navigation_context.h" | 8 #include "ios/web/public/web_state/navigation_context.h" |
| 9 #include "ios/web/public/web_state/web_state.h" | 9 #include "ios/web/public/web_state/web_state.h" |
| 10 #include "ios/web/web_state/navigation_context_impl.h" | 10 #include "ios/web/web_state/navigation_context_impl.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 title_was_set_info_ = base::MakeUnique<web::TestTitleWasSetInfo>(); | 89 title_was_set_info_ = base::MakeUnique<web::TestTitleWasSetInfo>(); |
| 90 title_was_set_info_->web_state = web_state(); | 90 title_was_set_info_->web_state = web_state(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void TestWebStateObserver::DidChangeVisibleSecurityState() { | 93 void TestWebStateObserver::DidChangeVisibleSecurityState() { |
| 94 did_change_visible_security_state_info_ = | 94 did_change_visible_security_state_info_ = |
| 95 base::MakeUnique<web::TestDidChangeVisibleSecurityStateInfo>(); | 95 base::MakeUnique<web::TestDidChangeVisibleSecurityStateInfo>(); |
| 96 did_change_visible_security_state_info_->web_state = web_state(); | 96 did_change_visible_security_state_info_->web_state = web_state(); |
| 97 } | 97 } |
| 98 | 98 |
| 99 void TestWebStateObserver::DidSuppressDialog() { |
| 100 did_suppress_dialog_info_ = |
| 101 base::MakeUnique<web::TestDidSuppressDialogInfo>(); |
| 102 did_suppress_dialog_info_->web_state = web_state(); |
| 103 } |
| 104 |
| 99 void TestWebStateObserver::DocumentSubmitted(const std::string& form_name, | 105 void TestWebStateObserver::DocumentSubmitted(const std::string& form_name, |
| 100 bool user_initiated) { | 106 bool user_initiated) { |
| 101 submit_document_info_ = base::MakeUnique<web::TestSubmitDocumentInfo>(); | 107 submit_document_info_ = base::MakeUnique<web::TestSubmitDocumentInfo>(); |
| 102 submit_document_info_->web_state = web_state(); | 108 submit_document_info_->web_state = web_state(); |
| 103 submit_document_info_->form_name = form_name; | 109 submit_document_info_->form_name = form_name; |
| 104 submit_document_info_->user_initiated = user_initiated; | 110 submit_document_info_->user_initiated = user_initiated; |
| 105 } | 111 } |
| 106 | 112 |
| 107 void TestWebStateObserver::FormActivityRegistered(const std::string& form_name, | 113 void TestWebStateObserver::FormActivityRegistered(const std::string& form_name, |
| 108 const std::string& field_name, | 114 const std::string& field_name, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 start_loading_info_ = base::MakeUnique<web::TestStartLoadingInfo>(); | 150 start_loading_info_ = base::MakeUnique<web::TestStartLoadingInfo>(); |
| 145 start_loading_info_->web_state = web_state(); | 151 start_loading_info_->web_state = web_state(); |
| 146 } | 152 } |
| 147 | 153 |
| 148 void TestWebStateObserver::DidStopLoading() { | 154 void TestWebStateObserver::DidStopLoading() { |
| 149 stop_loading_info_ = base::MakeUnique<web::TestStopLoadingInfo>(); | 155 stop_loading_info_ = base::MakeUnique<web::TestStopLoadingInfo>(); |
| 150 stop_loading_info_->web_state = web_state(); | 156 stop_loading_info_->web_state = web_state(); |
| 151 } | 157 } |
| 152 | 158 |
| 153 } // namespace web | 159 } // namespace web |
| OLD | NEW |