| 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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 views::WindowManagerConnection* window_manager_connection_; | 58 views::WindowManagerConnection* window_manager_connection_; |
| 59 TouchHudRenderer* touch_hud_renderer_; | 59 TouchHudRenderer* touch_hud_renderer_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(TouchHudUI); | 61 DISALLOW_COPY_AND_ASSIGN(TouchHudUI); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 TouchHudApplication::TouchHudApplication() : binding_(this) {} | 64 TouchHudApplication::TouchHudApplication() : binding_(this) {} |
| 65 TouchHudApplication::~TouchHudApplication() {} | 65 TouchHudApplication::~TouchHudApplication() {} |
| 66 | 66 |
| 67 void TouchHudApplication::OnStart(const service_manager::Identity& identity) { | 67 void TouchHudApplication::OnStart(const service_manager::ServiceInfo& info) { |
| 68 aura_init_.reset(new views::AuraInit(connector(), "views_mus_resources.pak")); | 68 aura_init_.reset(new views::AuraInit(connector(), "views_mus_resources.pak")); |
| 69 window_manager_connection_ = | 69 window_manager_connection_ = |
| 70 views::WindowManagerConnection::Create(connector(), identity); | 70 views::WindowManagerConnection::Create(connector(), info.identity); |
| 71 } | 71 } |
| 72 | 72 |
| 73 bool TouchHudApplication::OnConnect( | 73 bool TouchHudApplication::OnConnect( |
| 74 const service_manager::Identity& remote_identity, | 74 const service_manager::ServiceInfo& remote_info, |
| 75 service_manager::InterfaceRegistry* registry) { | 75 service_manager::InterfaceRegistry* registry) { |
| 76 registry->AddInterface<mash::mojom::Launchable>(this); | 76 registry->AddInterface<mash::mojom::Launchable>(this); |
| 77 return true; | 77 return true; |
| 78 } | 78 } |
| 79 | 79 |
| 80 void TouchHudApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) { | 80 void TouchHudApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) { |
| 81 if (!widget_) { | 81 if (!widget_) { |
| 82 widget_ = new views::Widget; | 82 widget_ = new views::Widget; |
| 83 views::Widget::InitParams params( | 83 views::Widget::InitParams params( |
| 84 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 84 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 108 | 108 |
| 109 void TouchHudApplication::Create( | 109 void TouchHudApplication::Create( |
| 110 const service_manager::Identity& remote_identity, | 110 const service_manager::Identity& remote_identity, |
| 111 mash::mojom::LaunchableRequest request) { | 111 mash::mojom::LaunchableRequest request) { |
| 112 binding_.Close(); | 112 binding_.Close(); |
| 113 binding_.Bind(std::move(request)); | 113 binding_.Bind(std::move(request)); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace touch_hud | 116 } // namespace touch_hud |
| 117 } // namespace ash | 117 } // namespace ash |
| OLD | NEW |