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 <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "third_party/skia/include/core/SkRefCnt.h" | 13 #include "third_party/skia/include/core/SkRefCnt.h" |
14 #include "ui/views/mus/mus_export.h" | 14 #include "ui/views/mus/mus_export.h" |
15 | 15 |
16 namespace aura { | 16 namespace aura { |
17 class Env; | 17 class Env; |
18 } | 18 } |
19 | 19 |
20 namespace font_service { | 20 namespace font_service { |
21 class FontLoader; | 21 class FontLoader; |
22 } | 22 } |
23 | 23 |
24 namespace shell { | 24 namespace service_manager { |
25 class Connector; | 25 class Connector; |
26 } | 26 } |
27 | 27 |
28 namespace views { | 28 namespace views { |
29 class ViewsDelegate; | 29 class ViewsDelegate; |
30 | 30 |
31 // Sets up necessary state for aura when run with the viewmanager. | 31 // Sets up necessary state for aura when run with the viewmanager. |
32 // |resource_file| is the path to the apk file containing the resources. | 32 // |resource_file| is the path to the apk file containing the resources. |
33 class VIEWS_MUS_EXPORT AuraInit { | 33 class VIEWS_MUS_EXPORT AuraInit { |
34 public: | 34 public: |
35 // |resource_file| is the file to load strings and 1x icons from. | 35 // |resource_file| is the file to load strings and 1x icons from. |
36 // |resource_file_200| can be an empty string, otherwise it is the file to | 36 // |resource_file_200| can be an empty string, otherwise it is the file to |
37 // load 2x icons from. | 37 // load 2x icons from. |
38 AuraInit(shell::Connector* connector, | 38 AuraInit(service_manager::Connector* connector, |
39 const std::string& resource_file, | 39 const std::string& resource_file, |
40 const std::string& resource_file_200 = std::string()); | 40 const std::string& resource_file_200 = std::string()); |
41 | 41 |
42 ~AuraInit(); | 42 ~AuraInit(); |
43 | 43 |
44 private: | 44 private: |
45 void InitializeResources(shell::Connector* connector); | 45 void InitializeResources(service_manager::Connector* connector); |
46 | 46 |
47 #if defined(OS_LINUX) | 47 #if defined(OS_LINUX) |
48 sk_sp<font_service::FontLoader> font_loader_; | 48 sk_sp<font_service::FontLoader> font_loader_; |
49 #endif | 49 #endif |
50 | 50 |
51 const std::string resource_file_; | 51 const std::string resource_file_; |
52 const std::string resource_file_200_; | 52 const std::string resource_file_200_; |
53 | 53 |
54 std::unique_ptr<aura::Env> env_; | 54 std::unique_ptr<aura::Env> env_; |
55 std::unique_ptr<ViewsDelegate> views_delegate_; | 55 std::unique_ptr<ViewsDelegate> views_delegate_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(AuraInit); | 57 DISALLOW_COPY_AND_ASSIGN(AuraInit); |
58 }; | 58 }; |
59 | 59 |
60 } // namespace views | 60 } // namespace views |
61 | 61 |
62 #endif // UI_VIEWS_MUS_AURA_INIT_H_ | 62 #endif // UI_VIEWS_MUS_AURA_INIT_H_ |
OLD | NEW |