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

Unified Diff: ash/content/screen_orientation_delegate_chromeos.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/common/wm_window_observer.h ('k') | ash/display/screen_orientation_controller_chromeos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/content/screen_orientation_delegate_chromeos.cc
diff --git a/ash/content/screen_orientation_delegate_chromeos.cc b/ash/content/screen_orientation_delegate_chromeos.cc
index 68777e675d1649e20ad3f95d595104c4ac5f8a46..93bc8c6aca516519646cc159ae213f26e37893ac 100644
--- a/ash/content/screen_orientation_delegate_chromeos.cc
+++ b/ash/content/screen_orientation_delegate_chromeos.cc
@@ -4,6 +4,7 @@
#include "ash/content/screen_orientation_delegate_chromeos.h"
+#include "ash/aura/wm_window_aura.h"
#include "ash/display/screen_orientation_controller_chromeos.h"
#include "ash/shell.h"
#include "content/public/browser/screen_orientation_provider.h"
@@ -14,6 +15,7 @@ namespace ash {
ScreenOrientationDelegateChromeos::ScreenOrientationDelegateChromeos() {
content::ScreenOrientationProvider::SetDelegate(this);
}
+
ScreenOrientationDelegateChromeos::~ScreenOrientationDelegateChromeos() {
content::ScreenOrientationProvider::SetDelegate(nullptr);
}
@@ -28,8 +30,8 @@ void ScreenOrientationDelegateChromeos::Lock(
blink::WebScreenOrientationLockType lock_orientation) {
Shell::GetInstance()
->screen_orientation_controller()
- ->LockOrientationForWindow(web_contents->GetNativeView(),
- lock_orientation);
+ ->LockOrientationForWindow(
+ WmWindowAura::Get(web_contents->GetNativeView()), lock_orientation);
}
bool ScreenOrientationDelegateChromeos::ScreenOrientationProviderSupported() {
@@ -37,11 +39,13 @@ bool ScreenOrientationDelegateChromeos::ScreenOrientationProviderSupported() {
->screen_orientation_controller()
->ScreenOrientationProviderSupported();
}
+
void ScreenOrientationDelegateChromeos::Unlock(
content::WebContents* web_contents) {
Shell::GetInstance()
->screen_orientation_controller()
- ->UnlockOrientationForWindow(web_contents->GetNativeView());
+ ->UnlockOrientationForWindow(
+ WmWindowAura::Get(web_contents->GetNativeView()));
}
} // namespace ash
« no previous file with comments | « ash/common/wm_window_observer.h ('k') | ash/display/screen_orientation_controller_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698