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

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc

Issue 2134753004: mash: Partially migrate ScreenOrientationController to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/display/screen_orientation_controller_chromeos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
index cf5a14a7efcd5c2e9d2a64a35bf53d25462408ff..5c19ec22ea991531feb3270e165feabea3d58003 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
@@ -5,6 +5,7 @@
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm/window_state.h"
+#include "ash/common/wm_lookup.h"
#include "ash/common/wm_shell.h"
#include "ash/display/display_manager.h"
#include "ash/display/screen_orientation_controller_chromeos.h"
@@ -580,8 +581,8 @@ void ArcAppWindowLauncherController::UnregisterApp(AppWindow* app_window) {
void ArcAppWindowLauncherController::SetOrientationLockForAppWindow(
AppWindow* app_window) {
- ash::Shell* shell = ash::Shell::GetInstance();
- aura::Window* window = app_window->widget()->GetNativeWindow();
+ ash::WmWindow* window =
+ ash::WmLookup::Get()->GetWindowForWidget(app_window->widget());
if (!window)
return;
arc::mojom::OrientationLock orientation_lock;
@@ -602,6 +603,7 @@ void ArcAppWindowLauncherController::SetOrientationLockForAppWindow(
app_window->set_requested_orientation_lock(orientation_lock);
}
+ ash::Shell* shell = ash::Shell::GetInstance();
shell->screen_orientation_controller()->LockOrientationForWindow(
window, BlinkOrientationLockFromMojom(orientation_lock));
}
« no previous file with comments | « ash/display/screen_orientation_controller_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698