ash_web_view_factory.cc 632 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2019 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. #include "ash/public/cpp/ash_web_view_factory.h"
  5. #include "base/check_op.h"
  6. namespace ash {
  7. namespace {
  8. AshWebViewFactory* g_instance = nullptr;
  9. } // namespace
  10. AshWebViewFactory::AshWebViewFactory() {
  11. DCHECK_EQ(nullptr, g_instance);
  12. g_instance = this;
  13. }
  14. AshWebViewFactory::~AshWebViewFactory() {
  15. DCHECK_EQ(g_instance, this);
  16. g_instance = nullptr;
  17. }
  18. // static
  19. AshWebViewFactory* AshWebViewFactory::Get() {
  20. return g_instance;
  21. }
  22. } // namespace ash