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

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

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
« no previous file with comments | « third_party/WebKit/Source/core/exported/WebFactory.h ('k') | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/exported/WebFactory.cpp
diff --git a/third_party/WebKit/Source/core/exported/WebFactory.cpp b/third_party/WebKit/Source/core/exported/WebFactory.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5b0df7f8ea8ee594dae865a7c099c3d59a57c2f8
--- /dev/null
+++ b/third_party/WebKit/Source/core/exported/WebFactory.cpp
@@ -0,0 +1,22 @@
+// 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.
+
+#include "core/exported/WebFactory.h"
+#include "platform/wtf/Assertions.h"
+
+namespace blink {
+
+WebFactory* WebFactory::factory_instance_ = nullptr;
+
+WebFactory& WebFactory::GetInstance() {
+ DCHECK(factory_instance_);
+ return *factory_instance_;
+}
+
+void WebFactory::SetInstance(WebFactory& factory) {
+ DCHECK_EQ(nullptr, factory_instance_);
+ factory_instance_ = &factory;
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/exported/WebFactory.h ('k') | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698