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 "mash/quick_launch/quick_launch.h" | 5 #include "mash/quick_launch/quick_launch.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 how == mojom::LaunchMode::DEFAULT; | 187 how == mojom::LaunchMode::DEFAULT; |
188 if (reuse && !windows_.empty()) { | 188 if (reuse && !windows_.empty()) { |
189 windows_.back()->Activate(); | 189 windows_.back()->Activate(); |
190 return; | 190 return; |
191 } | 191 } |
192 catalog::mojom::CatalogPtr catalog; | 192 catalog::mojom::CatalogPtr catalog; |
193 context()->connector()->BindInterface(catalog::mojom::kServiceName, &catalog); | 193 context()->connector()->BindInterface(catalog::mojom::kServiceName, &catalog); |
194 | 194 |
195 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( | 195 views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( |
196 new QuickLaunchUI(this, context()->connector(), std::move(catalog)), | 196 new QuickLaunchUI(this, context()->connector(), std::move(catalog)), |
197 nullptr, gfx::Rect(10, 640, 0, 0)); | 197 nullptr, gfx::Rect(10, 320, 0, 0)); |
198 window->Show(); | 198 window->Show(); |
199 windows_.push_back(window); | 199 windows_.push_back(window); |
200 } | 200 } |
201 | 201 |
202 void QuickLaunch::Create(const service_manager::Identity& remote_identity, | 202 void QuickLaunch::Create(const service_manager::Identity& remote_identity, |
203 ::mash::mojom::LaunchableRequest request) { | 203 ::mash::mojom::LaunchableRequest request) { |
204 bindings_.AddBinding(this, std::move(request)); | 204 bindings_.AddBinding(this, std::move(request)); |
205 } | 205 } |
206 | 206 |
207 } // namespace quick_launch | 207 } // namespace quick_launch |
208 } // namespace mash | 208 } // namespace mash |
OLD | NEW |