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 "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" |
6 | 6 |
7 #include "ash/shelf/shelf_util.h" | 7 #include "ash/shelf/shelf_util.h" |
8 #include "ash/wm/window_util.h" | 8 #include "ash/wm/window_util.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 10 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window); | 155 views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window); |
156 DCHECK(widget); | 156 DCHECK(widget); |
157 window_to_app_window_[window].reset(new AppWindow(task_id, widget)); | 157 window_to_app_window_[window].reset(new AppWindow(task_id, widget)); |
158 | 158 |
159 arc::ArcBridgeService* bridge_service = arc::ArcBridgeService::Get(); | 159 arc::ArcBridgeService* bridge_service = arc::ArcBridgeService::Get(); |
160 if (!bridge_service) { | 160 if (!bridge_service) { |
161 NOTREACHED(); | 161 NOTREACHED(); |
162 return; | 162 return; |
163 } | 163 } |
164 | 164 |
165 arc::AppInstance* app_instance = bridge_service->app_instance(); | 165 arc::mojom::AppInstance* app_instance = bridge_service->app_instance(); |
166 if (!app_instance) { | 166 if (!app_instance) { |
167 VLOG(2) << "Request to resolve task when bridge service is not ready."; | 167 VLOG(2) << "Request to resolve task when bridge service is not ready."; |
168 return; | 168 return; |
169 } | 169 } |
170 | 170 |
171 // Resolve information about task. | 171 // Resolve information about task. |
172 app_instance->GetTaskInfo( | 172 app_instance->GetTaskInfo( |
173 task_id, base::Bind(&ArcAppWindowLauncherController::OnGetTaskInfo, | 173 task_id, base::Bind(&ArcAppWindowLauncherController::OnGetTaskInfo, |
174 weak_ptr_factory_.GetWeakPtr(), task_id)); | 174 weak_ptr_factory_.GetWeakPtr(), task_id)); |
175 } | 175 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 ash::SetShelfIDForWindow(shelf_id, app_window->GetNativeWindow()); | 249 ash::SetShelfIDForWindow(shelf_id, app_window->GetNativeWindow()); |
250 } | 250 } |
251 | 251 |
252 AppWindowLauncherItemController* | 252 AppWindowLauncherItemController* |
253 ArcAppWindowLauncherController::ControllerForWindow(aura::Window* window) { | 253 ArcAppWindowLauncherController::ControllerForWindow(aura::Window* window) { |
254 WindowToAppWindow::iterator it = window_to_app_window_.find(window); | 254 WindowToAppWindow::iterator it = window_to_app_window_.find(window); |
255 if (it == window_to_app_window_.end()) | 255 if (it == window_to_app_window_.end()) |
256 return nullptr; | 256 return nullptr; |
257 return it->second->controller(); | 257 return it->second->controller(); |
258 } | 258 } |
OLD | NEW |