| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/views/mus/aura_init.h" | 5 #include "ui/views/mus/aura_init.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 Widget::InitParams* params, | 45 Widget::InitParams* params, |
| 46 internal::NativeWidgetDelegate* delegate) override {} | 46 internal::NativeWidgetDelegate* delegate) override {} |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(MusViewsDelegate); | 48 DISALLOW_COPY_AND_ASSIGN(MusViewsDelegate); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace | 51 } // namespace |
| 52 | 52 |
| 53 AuraInit::AuraInit(mojo::ApplicationImpl* app, const std::string& resource_file) | 53 AuraInit::AuraInit(mojo::ApplicationImpl* app, const std::string& resource_file) |
| 54 : resource_file_(resource_file), | 54 : resource_file_(resource_file), |
| 55 views_delegate_(new MusViewsDelegate) { | 55 views_delegate_(views::ViewsDelegate::GetInstance() |
| 56 ? nullptr |
| 57 : new MusViewsDelegate) { |
| 56 aura::Env::CreateInstance(false); | 58 aura::Env::CreateInstance(false); |
| 57 | 59 |
| 58 InitializeResources(app); | 60 InitializeResources(app); |
| 59 | 61 |
| 60 ui::InitializeInputMethodForTesting(); | 62 ui::InitializeInputMethodForTesting(); |
| 61 } | 63 } |
| 62 | 64 |
| 63 AuraInit::~AuraInit() { | 65 AuraInit::~AuraInit() { |
| 64 #if defined(OS_LINUX) && !defined(OS_ANDROID) | 66 #if defined(OS_LINUX) && !defined(OS_ANDROID) |
| 65 if (font_loader_.get()) { | 67 if (font_loader_.get()) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 93 font_loader_ = skia::AdoptRef(new font_service::FontLoader(app->shell())); | 95 font_loader_ = skia::AdoptRef(new font_service::FontLoader(app->shell())); |
| 94 SkFontConfigInterface::SetGlobal(font_loader_.get()); | 96 SkFontConfigInterface::SetGlobal(font_loader_.get()); |
| 95 #endif | 97 #endif |
| 96 | 98 |
| 97 // There is a bunch of static state in gfx::Font, by running this now, | 99 // There is a bunch of static state in gfx::Font, by running this now, |
| 98 // before any other apps load, we ensure all the state is set up. | 100 // before any other apps load, we ensure all the state is set up. |
| 99 gfx::Font(); | 101 gfx::Font(); |
| 100 } | 102 } |
| 101 | 103 |
| 102 } // namespace views | 104 } // namespace views |
| OLD | NEW |