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

Side by Side Diff: ash/content/display/screen_orientation_delegate_chromeos.cc

Issue 835883006: Revert of Enable ScreenOrientation on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 4
5 #include "ash/content/display/screen_orientation_delegate_chromeos.h" 5 #include "ash/content/display/screen_orientation_delegate_chromeos.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/display/display_info.h" 8 #include "ash/display/display_info.h"
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 break; 112 break;
113 default: 113 default:
114 NOTREACHED(); 114 NOTREACHED();
115 break; 115 break;
116 } 116 }
117 } 117 }
118 118
119 bool ScreenOrientationDelegate::ScreenOrientationProviderSupported() { 119 bool ScreenOrientationDelegate::ScreenOrientationProviderSupported() {
120 return Shell::GetInstance() 120 return Shell::GetInstance()
121 ->maximize_mode_controller() 121 ->maximize_mode_controller()
122 ->IsMaximizeModeWindowManagerEnabled(); 122 ->IsMaximizeModeWindowManagerEnabled() &&
123 CommandLine::ForCurrentProcess()->HasSwitch(
124 switches::kAshEnableTouchViewTesting);
123 } 125 }
124 126
125 void ScreenOrientationDelegate::Unlock(content::WebContents* web_contents) { 127 void ScreenOrientationDelegate::Unlock(content::WebContents* web_contents) {
126 aura::Window* requesting_window = web_contents->GetNativeView(); 128 aura::Window* requesting_window = web_contents->GetNativeView();
127 if (requesting_window != locking_window_) 129 if (requesting_window != locking_window_)
128 return; 130 return;
129 locking_window_ = NULL; 131 locking_window_ = NULL;
130 Shell::GetInstance()->maximize_mode_controller()->SetRotationLocked(false); 132 Shell::GetInstance()->maximize_mode_controller()->SetRotationLocked(false);
131 } 133 }
132 134
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 if (rotation == gfx::Display::ROTATE_90 || 171 if (rotation == gfx::Display::ROTATE_90 ||
170 rotation == gfx::Display::ROTATE_270) { 172 rotation == gfx::Display::ROTATE_270) {
171 controller->SetRotationLocked(true); 173 controller->SetRotationLocked(true);
172 } else { 174 } else {
173 controller->LockRotation(gfx::Display::ROTATE_90); 175 controller->LockRotation(gfx::Display::ROTATE_90);
174 } 176 }
175 } 177 }
176 } 178 }
177 179
178 } // namespace ash 180 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698