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

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; explicitily call OnWindowVisibilityChanging. 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
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 ecdc85634bae89d0f0ff418bdb6756deec5b69ba..621f3cbde5963f861de6ee8129db21dc19766f28 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/screen_orientation_controller_chromeos.h"
#include "ash/shelf/shelf_delegate.h"
@@ -557,8 +558,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;
@@ -572,6 +573,7 @@ void ArcAppWindowLauncherController::SetOrientationLockForAppWindow(
return;
orientation_lock = app_info->orientation_lock;
}
+ ash::Shell* shell = ash::Shell::GetInstance();
shell->screen_orientation_controller()->LockOrientationForWindow(
window, BlinkOrientationLockFromMojom(orientation_lock));
}

Powered by Google App Engine
This is Rietveld 408576698