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

Side by Side Diff: components/dom_distiller/ios/web_state_pool.h

Issue 2529283002: Save favicon during reading list distillation (Closed)
Patch Set: Use WebState pool Created 4 years 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_DOM_DISTILLER_IOS_WEB_STATE_POOL_H_
6 #define COMPONENTS_DOM_DISTILLER_IOS_WEB_STATE_POOL_H_
7
8 namespace web {
9 class WebState;
10 }
11
12 namespace dom_distiller {
13
14 // Delegate for the WebStatePool.
15 class WebStatePoolDelegate {
16 public:
17 // Called by the pool when |web_state| can be used by the delegate.
18 virtual void OnWebStateAvailable(web::WebState* web_state) = 0;
19 };
20
21 // Pool for WebStates with Favicon Driver attached. The WebStates from this pool
22 // have time to finish the download of the favicons when then are returned,
23 // before being reused.
24 class WebStatePool {
25 public:
26 // Request a WebState asynchronously. The pool will call |delegate|'s
27 // OnWebStateAvailable when a WebState is available.
28 virtual void RequestWebState(WebStatePoolDelegate* delegate) = 0;
29 // Called by the delegate to return a WebState to the pool. The WebState
30 // should not be used after being returned.
31 virtual void ReturnWebState(web::WebState* web_state) = 0;
32 };
33
34 } // namespace dom_distiller
35
36 #endif // COMPONENTS_DOM_DISTILLER_IOS_WEB_STATE_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698