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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 if (!widget_) { | 84 if (!widget_) { |
85 widget_ = new views::Widget; | 85 widget_ = new views::Widget; |
86 views::Widget::InitParams params( | 86 views::Widget::InitParams params( |
87 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 87 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
88 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 88 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
89 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; | 89 params.activatable = views::Widget::InitParams::ACTIVATABLE_NO; |
90 params.accept_events = false; | 90 params.accept_events = false; |
91 params.delegate = new TouchHudUI(widget_); | 91 params.delegate = new TouchHudUI(widget_); |
92 params.mus_properties[ui::mojom::WindowManager::kContainerId_InitProperty] = | 92 params.mus_properties[ui::mojom::WindowManager::kContainerId_InitProperty] = |
93 mojo::ConvertTo<std::vector<uint8_t>>( | 93 mojo::ConvertTo<std::vector<uint8_t>>( |
94 ash::kShellWindowId_OverlayContainer); | 94 static_cast<int32_t>(ash::kShellWindowId_OverlayContainer)); |
95 params.show_state = ui::SHOW_STATE_FULLSCREEN; | 95 params.show_state = ui::SHOW_STATE_FULLSCREEN; |
96 widget_->Init(params); | 96 widget_->Init(params); |
97 widget_->Show(); | 97 widget_->Show(); |
98 } else { | 98 } else { |
99 widget_->Close(); | 99 widget_->Close(); |
100 base::MessageLoop::current()->QuitWhenIdle(); | 100 base::MessageLoop::current()->QuitWhenIdle(); |
101 } | 101 } |
102 } | 102 } |
103 | 103 |
104 void TouchHudApplication::Create( | 104 void TouchHudApplication::Create( |
105 const service_manager::Identity& remote_identity, | 105 const service_manager::Identity& remote_identity, |
106 mash::mojom::LaunchableRequest request) { | 106 mash::mojom::LaunchableRequest request) { |
107 binding_.Close(); | 107 binding_.Close(); |
108 binding_.Bind(std::move(request)); | 108 binding_.Bind(std::move(request)); |
109 } | 109 } |
110 | 110 |
111 } // namespace touch_hud | 111 } // namespace touch_hud |
112 } // namespace ash | 112 } // namespace ash |
OLD | NEW |