Index: components/dom_distiller/ios/web_state_dispatcher.h |
diff --git a/components/dom_distiller/ios/web_state_dispatcher.h b/components/dom_distiller/ios/web_state_dispatcher.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f6d401cbde66bdf1bd785b22cde1b670f1ff7acc |
--- /dev/null |
+++ b/components/dom_distiller/ios/web_state_dispatcher.h |
@@ -0,0 +1,29 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_DOM_DISTILLER_IOS_WEB_STATE_DISPATCHER_H_ |
+#define COMPONENTS_DOM_DISTILLER_IOS_WEB_STATE_DISPATCHER_H_ |
+ |
+namespace web { |
+class WebState; |
+} |
+ |
+namespace dom_distiller { |
+ |
+// Dispatcher for WebState with Favicon Driver attached. The Webstate are kept |
+// alive between their creation and their return. After a WebState is returned, |
+// the dispatcher keeps it alive long enough for it to download the favicons. |
+class WebStateDispatcher { |
+ public: |
+ virtual ~WebStateDispatcher() {} |
+ // Returns a WebState with a Favicon Driver attached. |
+ virtual web::WebState* RequestWebState() = 0; |
+ // Called to return a WebState. The WebState should not be used after being |
+ // returned. |
+ virtual void ReturnWebState(web::WebState* web_state) = 0; |
Olivier
2016/12/16 10:31:31
NIT: Disallow copy
gambard
2016/12/16 13:49:19
Done.
|
+}; |
+ |
+} // namespace dom_distiller |
+ |
+#endif // COMPONENTS_DOM_DISTILLER_IOS_WEB_STATE_DISPATCHER_H_ |