| 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 #import "ios/web/public/test/fakes/test_web_state.h" | 5 #import "ios/web/public/test/fakes/test_web_state.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 WebStateInterfaceProvider* TestWebState::GetWebStateInterfaceProvider() { | 228 WebStateInterfaceProvider* TestWebState::GetWebStateInterfaceProvider() { |
| 229 return nullptr; | 229 return nullptr; |
| 230 } | 230 } |
| 231 | 231 |
| 232 bool TestWebState::HasOpener() const { | 232 bool TestWebState::HasOpener() const { |
| 233 return false; | 233 return false; |
| 234 } | 234 } |
| 235 | 235 |
| 236 void TestWebState::TakeSnapshot(const SnapshotCallback& callback, | 236 void TestWebState::TakeSnapshot(const SnapshotCallback& callback, |
| 237 CGSize target_size) const { | 237 CGSize target_size) const { |
| 238 base::SequencedTaskRunnerHandle::Get()->PostTask( | 238 callback.Run(gfx::Image([[UIImage alloc] init])); |
| 239 FROM_HERE, base::Bind(callback, gfx::Image())); | |
| 240 } | 239 } |
| 241 | 240 |
| 242 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { | 241 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { |
| 243 NOTREACHED(); | 242 NOTREACHED(); |
| 244 return base::WeakPtr<WebState>(); | 243 return base::WeakPtr<WebState>(); |
| 245 } | 244 } |
| 246 | 245 |
| 247 } // namespace web | 246 } // namespace web |
| OLD | NEW |