| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/aura/env.h" | 5 #include "ui/aura/env.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 ui::OSExchangeDataProviderFactory::SetFactory(nullptr); | 45 ui::OSExchangeDataProviderFactory::SetFactory(nullptr); |
| 46 | 46 |
| 47 #if defined(USE_OZONE) | 47 #if defined(USE_OZONE) |
| 48 gfx::ClientNativePixmapFactory::ResetInstance(); | 48 gfx::ClientNativePixmapFactory::ResetInstance(); |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 for (EnvObserver& observer : observers_) | 51 for (EnvObserver& observer : observers_) |
| 52 observer.OnWillDestroyEnv(); | 52 observer.OnWillDestroyEnv(); |
| 53 | 53 |
| 54 #if defined(USE_OZONE) | 54 #if defined(USE_OZONE) |
| 55 ui::OzonePlatform::Shutdown(); | 55 if (mode_ == Mode::LOCAL) |
| 56 ui::OzonePlatform::Shutdown(); |
| 56 #endif | 57 #endif |
| 57 | 58 |
| 58 DCHECK_EQ(this, lazy_tls_ptr.Pointer()->Get()); | 59 DCHECK_EQ(this, lazy_tls_ptr.Pointer()->Get()); |
| 59 lazy_tls_ptr.Pointer()->Set(NULL); | 60 lazy_tls_ptr.Pointer()->Set(NULL); |
| 60 } | 61 } |
| 61 | 62 |
| 62 // static | 63 // static |
| 63 std::unique_ptr<Env> Env::CreateInstance(Mode mode) { | 64 std::unique_ptr<Env> Env::CreateInstance(Mode mode) { |
| 64 DCHECK(!lazy_tls_ptr.Pointer()->Get()); | 65 DCHECK(!lazy_tls_ptr.Pointer()->Get()); |
| 65 std::unique_ptr<Env> env(new Env(mode)); | 66 std::unique_ptr<Env> env(new Env(mode)); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 ui::EventTargeter* Env::GetEventTargeter() { | 231 ui::EventTargeter* Env::GetEventTargeter() { |
| 231 NOTREACHED(); | 232 NOTREACHED(); |
| 232 return NULL; | 233 return NULL; |
| 233 } | 234 } |
| 234 | 235 |
| 235 std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() { | 236 std::unique_ptr<ui::OSExchangeData::Provider> Env::BuildProvider() { |
| 236 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); | 237 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); |
| 237 } | 238 } |
| 238 | 239 |
| 239 } // namespace aura | 240 } // namespace aura |
| OLD | NEW |