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..db096f1786633a55a51917951bb8a3c0ae826cc7 |
--- /dev/null |
+++ b/components/dom_distiller/ios/web_state_dispatcher.h |
@@ -0,0 +1,28 @@ |
+// 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: |
+ // Returns a WebState with a Favicon Driver attached. |
Olivier
2016/12/13 14:29:10
You need a virtual destructor.
gambard
2016/12/13 16:25:53
Done.
|
+ 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; |
+}; |
+ |
+} // namespace dom_distiller |
+ |
+#endif // COMPONENTS_DOM_DISTILLER_IOS_WEB_STATE_DISPATCHER_H_ |