OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "core/exported/WebFactory.h" |
| 6 #include "platform/wtf/Assertions.h" |
| 7 |
| 8 namespace blink { |
| 9 |
| 10 WebFactory* WebFactory::factory_instance_ = nullptr; |
| 11 |
| 12 WebFactory& WebFactory::GetInstance() { |
| 13 DCHECK(factory_instance_); |
| 14 return *factory_instance_; |
| 15 } |
| 16 |
| 17 void WebFactory::SetInstance(WebFactory& factory) { |
| 18 DCHECK_EQ(nullptr, factory_instance_); |
| 19 factory_instance_ = &factory; |
| 20 } |
| 21 |
| 22 } // namespace blink |
OLD | NEW |