OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 "ui/ozone/public/client_pixmap_manager.h" |
| 6 |
| 7 #include "base/trace_event/trace_event.h" |
| 8 #include "ui/ozone/platform_object.h" |
| 9 #include "ui/ozone/platform_selection.h" |
| 10 |
| 11 namespace ui { |
| 12 |
| 13 namespace { |
| 14 |
| 15 ClientPixmapManager* g_instance = nullptr; |
| 16 |
| 17 } // namespace |
| 18 |
| 19 // static |
| 20 ClientPixmapManager* ClientPixmapManager::GetInstance() { |
| 21 return g_instance; |
| 22 } |
| 23 |
| 24 // static |
| 25 void ClientPixmapManager::SetInstance(ClientPixmapManager* instance) { |
| 26 DCHECK(!g_instance); |
| 27 DCHECK(instance); |
| 28 g_instance = instance; |
| 29 } |
| 30 |
| 31 // static |
| 32 scoped_ptr<ClientPixmapManager> ClientPixmapManager::Create() { |
| 33 TRACE_EVENT1("ozone", "ClientPixmapManager::Create", "platform", |
| 34 GetOzonePlatformName()); |
| 35 return PlatformObject<ClientPixmapManager>::Create(); |
| 36 } |
| 37 |
| 38 ClientPixmapManager::ClientPixmapManager() {} |
| 39 |
| 40 ClientPixmapManager::~ClientPixmapManager() {} |
| 41 |
| 42 } // namespace ui |
OLD | NEW |