| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/touch_hud/mus/touch_hud_application.h" | 5 #include "ash/touch_hud/mus/touch_hud_application.h" |
| 6 | 6 |
| 7 #include "ash/public/cpp/shell_window_ids.h" | 7 #include "ash/public/cpp/shell_window_ids.h" |
| 8 #include "ash/touch_hud/touch_hud_renderer.h" | 8 #include "ash/touch_hud/touch_hud_renderer.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 views::WindowManagerConnection* window_manager_connection_; | 61 views::WindowManagerConnection* window_manager_connection_; |
| 62 TouchHudRenderer* touch_hud_renderer_; | 62 TouchHudRenderer* touch_hud_renderer_; |
| 63 | 63 |
| 64 DISALLOW_COPY_AND_ASSIGN(TouchHudUI); | 64 DISALLOW_COPY_AND_ASSIGN(TouchHudUI); |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 TouchHudApplication::TouchHudApplication() : binding_(this) {} | 67 TouchHudApplication::TouchHudApplication() : binding_(this) {} |
| 68 TouchHudApplication::~TouchHudApplication() {} | 68 TouchHudApplication::~TouchHudApplication() {} |
| 69 | 69 |
| 70 void TouchHudApplication::OnStart(service_manager::ServiceContext* context) { | 70 void TouchHudApplication::OnStart() { |
| 71 aura_init_ = base::MakeUnique<views::AuraInit>( | 71 aura_init_ = base::MakeUnique<views::AuraInit>( |
| 72 context->connector(), context->identity(), "views_mus_resources.pak"); | 72 context()->connector(), context()->identity(), "views_mus_resources.pak"); |
| 73 window_manager_connection_ = views::WindowManagerConnection::Create( | 73 window_manager_connection_ = views::WindowManagerConnection::Create( |
| 74 context->connector(), context->identity()); | 74 context()->connector(), context()->identity()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool TouchHudApplication::OnConnect( | 77 bool TouchHudApplication::OnConnect( |
| 78 const service_manager::ServiceInfo& remote_info, | 78 const service_manager::ServiceInfo& remote_info, |
| 79 service_manager::InterfaceRegistry* registry) { | 79 service_manager::InterfaceRegistry* registry) { |
| 80 registry->AddInterface<mash::mojom::Launchable>(this); | 80 registry->AddInterface<mash::mojom::Launchable>(this); |
| 81 return true; | 81 return true; |
| 82 } | 82 } |
| 83 | 83 |
| 84 void TouchHudApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) { | 84 void TouchHudApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 112 | 112 |
| 113 void TouchHudApplication::Create( | 113 void TouchHudApplication::Create( |
| 114 const service_manager::Identity& remote_identity, | 114 const service_manager::Identity& remote_identity, |
| 115 mash::mojom::LaunchableRequest request) { | 115 mash::mojom::LaunchableRequest request) { |
| 116 binding_.Close(); | 116 binding_.Close(); |
| 117 binding_.Bind(std::move(request)); | 117 binding_.Bind(std::move(request)); |
| 118 } | 118 } |
| 119 | 119 |
| 120 } // namespace touch_hud | 120 } // namespace touch_hud |
| 121 } // namespace ash | 121 } // namespace ash |
| OLD | NEW |