| 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/interfaces/container.mojom.h" | 7 #include "ash/public/interfaces/container.mojom.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 TouchHudApplication::TouchHudApplication() : binding_(this) {} | 60 TouchHudApplication::TouchHudApplication() : binding_(this) {} |
| 61 TouchHudApplication::~TouchHudApplication() {} | 61 TouchHudApplication::~TouchHudApplication() {} |
| 62 | 62 |
| 63 void TouchHudApplication::OnStart(const shell::Identity& identity) { | 63 void TouchHudApplication::OnStart(const shell::Identity& identity) { |
| 64 aura_init_.reset(new views::AuraInit(connector(), "views_mus_resources.pak")); | 64 aura_init_.reset(new views::AuraInit(connector(), "views_mus_resources.pak")); |
| 65 window_manager_connection_ = | 65 window_manager_connection_ = |
| 66 views::WindowManagerConnection::Create(connector(), identity); | 66 views::WindowManagerConnection::Create(connector(), identity); |
| 67 } | 67 } |
| 68 | 68 |
| 69 bool TouchHudApplication::OnConnect(shell::Connection* connection) { | 69 bool TouchHudApplication::OnConnect(const shell::Identity& remote_identity, |
| 70 connection->AddInterface<mash::mojom::Launchable>(this); | 70 shell::InterfaceRegistry* registry) { |
| 71 registry->AddInterface<mash::mojom::Launchable>(this); |
| 71 return true; | 72 return true; |
| 72 } | 73 } |
| 73 | 74 |
| 74 void TouchHudApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) { | 75 void TouchHudApplication::Launch(uint32_t what, mash::mojom::LaunchMode how) { |
| 75 if (!widget_) { | 76 if (!widget_) { |
| 76 widget_ = new views::Widget; | 77 widget_ = new views::Widget; |
| 77 views::Widget::InitParams params( | 78 views::Widget::InitParams params( |
| 78 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 79 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 79 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 80 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 80 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; | 81 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 100 } | 101 } |
| 101 } | 102 } |
| 102 | 103 |
| 103 void TouchHudApplication::Create(const shell::Identity& remote_identity, | 104 void TouchHudApplication::Create(const shell::Identity& remote_identity, |
| 104 mash::mojom::LaunchableRequest request) { | 105 mash::mojom::LaunchableRequest request) { |
| 105 binding_.Bind(std::move(request)); | 106 binding_.Bind(std::move(request)); |
| 106 } | 107 } |
| 107 | 108 |
| 108 } // namespace touch_hud | 109 } // namespace touch_hud |
| 109 } // namespace ash | 110 } // namespace ash |
| OLD | NEW |