| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test_web_state.h" | 5 #include "ios/web/public/test/test_web_state.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 | 10 |
| 11 namespace web { | 11 namespace web { |
| 12 | 12 |
| 13 TestWebState::TestWebState() | 13 TestWebState::TestWebState() |
| 14 : trust_level_(kAbsolute), content_is_html_(true) {} | 14 : web_usage_enabled_(false), |
| 15 trust_level_(kAbsolute), |
| 16 content_is_html_(true) {} |
| 15 | 17 |
| 16 TestWebState::~TestWebState() = default; | 18 TestWebState::~TestWebState() = default; |
| 17 | 19 |
| 18 UIView* TestWebState::GetView() { | |
| 19 return nullptr; | |
| 20 } | |
| 21 | |
| 22 WebStateDelegate* TestWebState::GetDelegate() { | 20 WebStateDelegate* TestWebState::GetDelegate() { |
| 23 return nil; | 21 return nil; |
| 24 } | 22 } |
| 25 | 23 |
| 26 void TestWebState::SetDelegate(WebStateDelegate* delegate) {} | 24 void TestWebState::SetDelegate(WebStateDelegate* delegate) {} |
| 27 | 25 |
| 28 BrowserState* TestWebState::GetBrowserState() const { | 26 BrowserState* TestWebState::GetBrowserState() const { |
| 29 return nullptr; | 27 return nullptr; |
| 30 } | 28 } |
| 31 | 29 |
| 30 bool TestWebState::IsWebUsageEnabled() const { |
| 31 return web_usage_enabled_; |
| 32 } |
| 33 |
| 34 void TestWebState::SetWebUsageEnabled(bool enabled) { |
| 35 web_usage_enabled_ = enabled; |
| 36 } |
| 37 |
| 38 UIView* TestWebState::GetView() { |
| 39 return nullptr; |
| 40 } |
| 41 |
| 32 NavigationManager* TestWebState::GetNavigationManager() { | 42 NavigationManager* TestWebState::GetNavigationManager() { |
| 33 return nullptr; | 43 return nullptr; |
| 34 } | 44 } |
| 35 | 45 |
| 36 CRWJSInjectionReceiver* TestWebState::GetJSInjectionReceiver() const { | 46 CRWJSInjectionReceiver* TestWebState::GetJSInjectionReceiver() const { |
| 37 return nullptr; | 47 return nullptr; |
| 38 } | 48 } |
| 39 | 49 |
| 40 void TestWebState::ExecuteJavaScript(const base::string16& javascript) {} | 50 void TestWebState::ExecuteJavaScript(const base::string16& javascript) {} |
| 41 | 51 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 const ImageDownloadCallback& callback) { | 126 const ImageDownloadCallback& callback) { |
| 117 return 0; | 127 return 0; |
| 118 } | 128 } |
| 119 | 129 |
| 120 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { | 130 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { |
| 121 NOTREACHED(); | 131 NOTREACHED(); |
| 122 return base::WeakPtr<WebState>(); | 132 return base::WeakPtr<WebState>(); |
| 123 } | 133 } |
| 124 | 134 |
| 125 } // namespace web | 135 } // namespace web |
| OLD | NEW |