| 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 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" | 4 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" |
| 5 | 5 |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "ash/display/screen_orientation_controller_chromeos.h" | 8 #include "ash/display/screen_orientation_controller_chromeos.h" |
| 9 #include "ash/public/cpp/window_properties.h" | 9 #include "ash/public/cpp/window_properties.h" |
| 10 #include "ash/shared/app_types.h" | 10 #include "ash/shared/app_types.h" |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 } | 704 } |
| 705 } | 705 } |
| 706 ash::Shell* shell = ash::Shell::Get(); | 706 ash::Shell* shell = ash::Shell::Get(); |
| 707 shell->screen_orientation_controller()->LockOrientationForWindow( | 707 shell->screen_orientation_controller()->LockOrientationForWindow( |
| 708 window, BlinkOrientationLockFromMojom(orientation_lock), | 708 window, BlinkOrientationLockFromMojom(orientation_lock), |
| 709 lock_completion_behavior); | 709 lock_completion_behavior); |
| 710 } | 710 } |
| 711 | 711 |
| 712 // static | 712 // static |
| 713 int ArcAppWindowLauncherController::GetWindowTaskId(aura::Window* window) { | 713 int ArcAppWindowLauncherController::GetWindowTaskId(aura::Window* window) { |
| 714 const std::string arc_app_id = exo::ShellSurface::GetApplicationId(window); | 714 const std::string* arc_app_id = exo::ShellSurface::GetApplicationId(window); |
| 715 if (arc_app_id.empty()) | 715 if (!arc_app_id) |
| 716 return -1; | 716 return -1; |
| 717 | 717 |
| 718 int task_id = -1; | 718 int task_id = -1; |
| 719 if (sscanf(arc_app_id.c_str(), "org.chromium.arc.%d", &task_id) != 1) | 719 if (sscanf(arc_app_id->c_str(), "org.chromium.arc.%d", &task_id) != 1) |
| 720 return -1; | 720 return -1; |
| 721 | 721 |
| 722 return task_id; | 722 return task_id; |
| 723 } | 723 } |
| OLD | NEW |