| 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 #ifndef UI_VIEWS_MUS_AURA_INIT_H_ | 5 #ifndef UI_VIEWS_MUS_AURA_INIT_H_ |
| 6 #define UI_VIEWS_MUS_AURA_INIT_H_ | 6 #define UI_VIEWS_MUS_AURA_INIT_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 12 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 13 #include "skia/ext/refptr.h" | 14 #include "skia/ext/refptr.h" |
| 14 #include "ui/views/mus/mus_export.h" | 15 #include "ui/views/mus/mus_export.h" |
| 15 | 16 |
| 17 namespace aura { |
| 18 class Env; |
| 19 } |
| 20 |
| 16 namespace font_service { | 21 namespace font_service { |
| 17 class FontLoader; | 22 class FontLoader; |
| 18 } | 23 } |
| 19 | 24 |
| 20 namespace mojo { | 25 namespace mojo { |
| 21 class Connector; | 26 class Connector; |
| 22 } | 27 } |
| 23 | 28 |
| 24 namespace views { | 29 namespace views { |
| 25 class ViewsDelegate; | 30 class ViewsDelegate; |
| 26 | 31 |
| 27 // Sets up necessary state for aura when run with the viewmanager. | 32 // Sets up necessary state for aura when run with the viewmanager. |
| 28 // |resource_file| is the path to the apk file containing the resources. | 33 // |resource_file| is the path to the apk file containing the resources. |
| 29 class VIEWS_MUS_EXPORT AuraInit { | 34 class VIEWS_MUS_EXPORT AuraInit { |
| 30 public: | 35 public: |
| 31 AuraInit(mojo::Connector* connector, const std::string& resource_file); | 36 AuraInit(mojo::Connector* connector, const std::string& resource_file); |
| 32 ~AuraInit(); | 37 ~AuraInit(); |
| 33 | 38 |
| 34 private: | 39 private: |
| 35 void InitializeResources(mojo::Connector* connector); | 40 void InitializeResources(mojo::Connector* connector); |
| 36 | 41 |
| 37 #if defined(OS_LINUX) && !defined(OS_ANDROID) | 42 #if defined(OS_LINUX) && !defined(OS_ANDROID) |
| 38 skia::RefPtr<font_service::FontLoader> font_loader_; | 43 skia::RefPtr<font_service::FontLoader> font_loader_; |
| 39 #endif | 44 #endif |
| 40 | 45 |
| 41 const std::string resource_file_; | 46 const std::string resource_file_; |
| 42 | 47 |
| 48 std::unique_ptr<aura::Env> env_; |
| 43 scoped_ptr<ViewsDelegate> views_delegate_; | 49 scoped_ptr<ViewsDelegate> views_delegate_; |
| 44 | 50 |
| 45 DISALLOW_COPY_AND_ASSIGN(AuraInit); | 51 DISALLOW_COPY_AND_ASSIGN(AuraInit); |
| 46 }; | 52 }; |
| 47 | 53 |
| 48 } // namespace views | 54 } // namespace views |
| 49 | 55 |
| 50 #endif // UI_VIEWS_MUS_AURA_INIT_H_ | 56 #endif // UI_VIEWS_MUS_AURA_INIT_H_ |
| OLD | NEW |