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 MASH_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_ | 5 #ifndef MASH_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_ |
6 #define MASH_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_ | 6 #define MASH_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "services/ui/public/cpp/window_tree_client_delegate.h" | 11 #include "services/ui/public/cpp/window_tree_client_delegate.h" |
12 #include "services/ui/public/interfaces/window_manager.mojom.h" | 12 #include "services/ui/public/interfaces/window_manager.mojom.h" |
13 #include "ui/views/mus/aura_init.h" | 13 #include "ui/views/mus/aura_init.h" |
14 #include "ui/views/views_delegate.h" | 14 #include "ui/views/views_delegate.h" |
15 | 15 |
16 namespace shell { | 16 namespace service_manager { |
17 class ServiceContext; | 17 class ServiceContext; |
18 } | 18 } |
19 | 19 |
20 namespace views { | 20 namespace views { |
21 class AuraInit; | 21 class AuraInit; |
22 } | 22 } |
23 | 23 |
24 // Does the necessary setup to use mus, views and the example wm. | 24 // Does the necessary setup to use mus, views and the example wm. |
25 class MUSViewsInit : public views::ViewsDelegate, | 25 class MUSViewsInit : public views::ViewsDelegate, |
26 public ui::WindowTreeClientDelegate { | 26 public ui::WindowTreeClientDelegate { |
27 public: | 27 public: |
28 explicit MUSViewsInit(shell::ServiceContext* app); | 28 explicit MUSViewsInit(service_manager::ServiceContext* app); |
29 ~MUSViewsInit() override; | 29 ~MUSViewsInit() override; |
30 | 30 |
31 private: | 31 private: |
32 ui::Window* NewWindow(); | 32 ui::Window* NewWindow(); |
33 | 33 |
34 // views::ViewsDelegate: | 34 // views::ViewsDelegate: |
35 views::NativeWidget* CreateNativeWidget( | 35 views::NativeWidget* CreateNativeWidget( |
36 views::internal::NativeWidgetDelegate* delegate) override; | 36 views::internal::NativeWidgetDelegate* delegate) override; |
37 void OnBeforeWidgetInit( | 37 void OnBeforeWidgetInit( |
38 views::Widget::InitParams* params, | 38 views::Widget::InitParams* params, |
39 views::internal::NativeWidgetDelegate* delegate) override; | 39 views::internal::NativeWidgetDelegate* delegate) override; |
40 | 40 |
41 // ui::WindowTreeClientDelegate: | 41 // ui::WindowTreeClientDelegate: |
42 void OnEmbed(ui::Window* root) override; | 42 void OnEmbed(ui::Window* root) override; |
43 void OnDidDestroyClient(ui::WindowTreeClient* client) override; | 43 void OnDidDestroyClient(ui::WindowTreeClient* client) override; |
44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
45 HICON GetSmallWindowIcon() const override; | 45 HICON GetSmallWindowIcon() const override; |
46 #endif | 46 #endif |
47 | 47 |
48 shell::ServiceContext* app_; | 48 service_manager::ServiceContext* app_; |
49 std::unique_ptr<views::AuraInit> aura_init_; | 49 std::unique_ptr<views::AuraInit> aura_init_; |
50 ui::mojom::WindowManagerPtr window_manager_; | 50 ui::mojom::WindowManagerPtr window_manager_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(MUSViewsInit); | 52 DISALLOW_COPY_AND_ASSIGN(MUSViewsInit); |
53 }; | 53 }; |
54 | 54 |
55 #endif // MASH_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_ | 55 #endif // MASH_EXAMPLE_COMMON_MUS_VIEWS_INIT_H_ |
OLD | NEW |