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

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: Fix shell_surface_unittest. 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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.cc ('k') | components/exo/shell_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698