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

Unified Diff: third_party/WebKit/Source/core/exported/WebFactory.h

Issue 2887523003: Introduced WebFactory and WebFactoryImpl for constructing web/ classes (Closed)
Patch Set: Added TODOs for review feedback Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/exported/WebFactory.h
diff --git a/third_party/WebKit/Source/core/exported/WebFactory.h b/third_party/WebKit/Source/core/exported/WebFactory.h
new file mode 100644
index 0000000000000000000000000000000000000000..49a43857624863a9dfb1146623adecd6c6d9512c
--- /dev/null
+++ b/third_party/WebKit/Source/core/exported/WebFactory.h
@@ -0,0 +1,37 @@
+// 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|.
+ // TODO(sashab): Make this method private to WebKit.cpp.
+ 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
« no previous file with comments | « third_party/WebKit/Source/core/exported/BUILD.gn ('k') | third_party/WebKit/Source/core/exported/WebFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698