| Index: ui/views/mus/aura_init.h
|
| diff --git a/ui/views/mus/aura_init.h b/ui/views/mus/aura_init.h
|
| index 5dd00c0325005f30b70aed2948df95e05634d5ca..9ef2f2d9d1c28e446a88faa23ced229f03a0e332 100644
|
| --- a/ui/views/mus/aura_init.h
|
| +++ b/ui/views/mus/aura_init.h
|
| @@ -16,6 +16,11 @@
|
|
|
| namespace aura {
|
| class Env;
|
| +class WindowPort;
|
| +}
|
| +
|
| +namespace base {
|
| +class SingleThreadTaskRunner;
|
| }
|
|
|
| namespace font_service {
|
| @@ -24,29 +29,44 @@ class FontLoader;
|
|
|
| namespace service_manager {
|
| class Connector;
|
| +class Identity;
|
| }
|
|
|
| namespace views {
|
| +class MusClient;
|
| class ViewsDelegate;
|
|
|
| // Sets up necessary state for aura when run with the viewmanager.
|
| // |resource_file| is the path to the apk file containing the resources.
|
| class VIEWS_MUS_EXPORT AuraInit {
|
| public:
|
| + enum class Mode {
|
| + // Indicates AuraInit should target using aura with mus.
|
| + AURA_MUS,
|
| +
|
| + // Indicates AuraInit should target using ui::Window.
|
| + UI,
|
| + };
|
| +
|
| // |resource_file| is the file to load strings and 1x icons from.
|
| // |resource_file_200| can be an empty string, otherwise it is the file to
|
| // load 2x icons from.
|
| AuraInit(service_manager::Connector* connector,
|
| + const service_manager::Identity& identity,
|
| const std::string& resource_file,
|
| const std::string& resource_file_200 = std::string(),
|
| - const aura::Env::WindowPortFactory& window_port_factory =
|
| - aura::Env::WindowPortFactory());
|
| -
|
| + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = nullptr,
|
| + Mode mode = Mode::UI);
|
| ~AuraInit();
|
|
|
| + // Only valid if Mode::AURA_MUS was passed to constructor.
|
| + MusClient* mus_client() { return mus_client_.get(); }
|
| +
|
| private:
|
| void InitializeResources(service_manager::Connector* connector);
|
|
|
| + std::unique_ptr<aura::WindowPort> CreateWindowPort(aura::Window* window);
|
| +
|
| #if defined(OS_LINUX)
|
| sk_sp<font_service::FontLoader> font_loader_;
|
| #endif
|
| @@ -54,6 +74,7 @@ class VIEWS_MUS_EXPORT AuraInit {
|
| const std::string resource_file_;
|
| const std::string resource_file_200_;
|
|
|
| + std::unique_ptr<MusClient> mus_client_;
|
| std::unique_ptr<aura::Env> env_;
|
| std::unique_ptr<ViewsDelegate> views_delegate_;
|
|
|
|
|