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 |