Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc

Issue 2889523003: Add kApplicationIdKey for ShellSurface::GetApplicationId and SetApplicationId (Closed)
Patch Set: Address comments. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 } 723 }
724 } 724 }
725 ash::Shell* shell = ash::Shell::Get(); 725 ash::Shell* shell = ash::Shell::Get();
726 shell->screen_orientation_controller()->LockOrientationForWindow( 726 shell->screen_orientation_controller()->LockOrientationForWindow(
727 window, BlinkOrientationLockFromMojom(orientation_lock), 727 window, BlinkOrientationLockFromMojom(orientation_lock),
728 lock_completion_behavior); 728 lock_completion_behavior);
729 } 729 }
730 730
731 // static 731 // static
732 int ArcAppWindowLauncherController::GetWindowTaskId(aura::Window* window) { 732 int ArcAppWindowLauncherController::GetWindowTaskId(aura::Window* window) {
733 const std::string arc_app_id = exo::ShellSurface::GetApplicationId(window); 733 const std::string* arc_app_id = exo::ShellSurface::GetApplicationId(window);
734 if (arc_app_id.empty()) 734 if (!arc_app_id)
735 return -1; 735 return -1;
736 736
737 int task_id = -1; 737 int task_id = -1;
738 if (sscanf(arc_app_id.c_str(), "org.chromium.arc.%d", &task_id) != 1) 738 if (sscanf(arc_app_id->c_str(), "org.chromium.arc.%d", &task_id) != 1)
739 return -1; 739 return -1;
740 740
741 return task_id; 741 return task_id;
742 } 742 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698