Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: ios/web/public/test/fakes/test_web_state.mm

Issue 2945213002: [ios] Snapshot for WebState (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/callback.h" 9 #include "base/callback.h"
10 #import "ios/web/public/web_state/ui/crw_content_view.h" 10 #import "ios/web/public/web_state/ui/crw_content_view.h"
11 #include "ios/web/public/web_state/web_state_observer.h" 11 #include "ios/web/public/web_state/web_state_observer.h"
12 #include "ui/gfx/image/image.h"
12 13
13 #if !defined(__has_feature) || !__has_feature(objc_arc) 14 #if !defined(__has_feature) || !__has_feature(objc_arc)
14 #error "This file requires ARC support." 15 #error "This file requires ARC support."
15 #endif 16 #endif
16 17
17 namespace web { 18 namespace web {
18 19
19 void TestWebState::AddObserver(WebStateObserver* observer) { 20 void TestWebState::AddObserver(WebStateObserver* observer) {
20 observers_.AddObserver(observer); 21 observers_.AddObserver(observer);
21 } 22 }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 224 }
224 225
225 WebStateInterfaceProvider* TestWebState::GetWebStateInterfaceProvider() { 226 WebStateInterfaceProvider* TestWebState::GetWebStateInterfaceProvider() {
226 return nullptr; 227 return nullptr;
227 } 228 }
228 229
229 bool TestWebState::HasOpener() const { 230 bool TestWebState::HasOpener() const {
230 return false; 231 return false;
231 } 232 }
232 233
234 void TestWebState::TakeSnapshot(
235 const base::Callback<void(const gfx::Image& snapshot)>& callback) const {
236 callback.Run(gfx::Image());
Eugene But (OOO till 7-30) 2017/06/21 22:11:28 Should this be asynchronous call?
edchin 2017/06/22 07:01:07 Done. Using SequencedTaskRunner.
237 }
238
233 base::WeakPtr<WebState> TestWebState::AsWeakPtr() { 239 base::WeakPtr<WebState> TestWebState::AsWeakPtr() {
234 NOTREACHED(); 240 NOTREACHED();
235 return base::WeakPtr<WebState>(); 241 return base::WeakPtr<WebState>();
236 } 242 }
237 243
238 } // namespace web 244 } // namespace web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698