Index: third_party/WebKit/Source/core/WebFactory.h |
diff --git a/third_party/WebKit/Source/core/WebFactory.h b/third_party/WebKit/Source/core/WebFactory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3b064005d34ef5714ea7330c2fc969c4b0d441e1 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/WebFactory.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2017 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 WebFactory_h |
+#define WebFactory_h |
+ |
+#include "core/CoreExport.h" |
+#include "public/platform/WebPageVisibilityState.h" |
+ |
+namespace blink { |
+ |
+class ChromeClient; |
+class WebViewBase; |
+class WebViewClient; |
+ |
+// WebFactory is a temporary class implemented in web/ that allows classes to |
+// construct interfaces that are being moved out of web/. |
+// This class will be removed once all implementations are in core/ or modules/. |
+class CORE_EXPORT WebFactory { |
+ public: |
+ // Takes ownership of |factory|. |
+ static void SetInstance(WebFactory*); |
+ static WebFactory& GetInstance(); |
+ |
+ virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0; |
+ virtual WebViewBase* CreateWebViewBase(WebViewClient*, |
+ WebPageVisibilityState) const = 0; |
+ |
+ private: |
+ static WebFactory* factory_instance_; |
+}; |
+ |
+} // namespace blink |
+ |
+#endif |