Lines Matching refs:DeviceRotation
37 std::map<SensorRotation, DeviceRotation> ScreenRotationController::sensorToDeviceRotationMap_;
38 std::map<DeviceRotation, Rotation> ScreenRotationController::deviceToDisplayRotationMap_;
40 DeviceRotation ScreenRotationController::lastSensorRotationConverted_ = DeviceRotation::INVALID;
85 void ScreenRotationController::HandleSensorEventInput(DeviceRotation deviceRotation)
87 if (deviceRotation == DeviceRotation::INVALID) {
112 return defaultDeviceRotation_ == 0 ? ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT) :
113 ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_LANDSCAPE);
129 Orientation requestedOrientation, DeviceRotation sensorRotationConverted)
167 Rotation ScreenRotationController::ProcessAutoRotationPortraitOrientation(DeviceRotation sensorRotationConverted)
176 Rotation ScreenRotationController::ProcessAutoRotationLandscapeOrientation(DeviceRotation sensorRotationConverted)
195 DeviceRotation ScreenRotationController::CalcDeviceRotation(SensorRotation sensorRotation)
198 return DeviceRotation::INVALID;
215 return static_cast<DeviceRotation>(deviceRotationValue);
228 Orientation orientation, DeviceRotation sensorRotationConverted)
271 void ScreenRotationController::ProcessSwitchToAutoRotation(DeviceRotation rotation)
273 if (rotation != DeviceRotation::INVALID) {
278 void ScreenRotationController::ProcessSwitchToAutoRotationPortrait(DeviceRotation rotation)
284 SetScreenRotation(ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT));
287 void ScreenRotationController::ProcessSwitchToAutoRotationLandscape(DeviceRotation rotation)
293 SetScreenRotation(ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_LANDSCAPE));
305 SetScreenRotation(ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT));
317 SetScreenRotation(ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_LANDSCAPE));
320 DeviceRotation ScreenRotationController::ConvertSensorToDeviceRotation(SensorRotation sensorRotation)
336 Rotation ScreenRotationController::ConvertDeviceToDisplayRotation(DeviceRotation deviceRotation)
338 if (deviceRotation == DeviceRotation::INVALID) {
357 {DeviceRotation::ROTATION_PORTRAIT,
359 {DeviceRotation::ROTATION_LANDSCAPE,
361 {DeviceRotation::ROTATION_PORTRAIT_INVERTED,
363 {DeviceRotation::ROTATION_LANDSCAPE_INVERTED,
385 {SensorRotation::INVALID, DeviceRotation::INVALID},
390 bool ScreenRotationController::IsDeviceRotationVertical(DeviceRotation deviceRotation)
392 return (deviceRotation == DeviceRotation::ROTATION_PORTRAIT) ||
393 (deviceRotation == DeviceRotation::ROTATION_PORTRAIT_INVERTED);
396 bool ScreenRotationController::IsDeviceRotationHorizontal(DeviceRotation deviceRotation)
398 return (deviceRotation == DeviceRotation::ROTATION_LANDSCAPE) ||
399 (deviceRotation == DeviceRotation::ROTATION_LANDSCAPE_INVERTED);
414 return Rotation::ROTATION_0 == ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT);
419 return (rotation == ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT)) ||
420 (rotation == ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT_INVERTED));
425 return (rotation == ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_LANDSCAPE)) ||
426 (rotation == ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_LANDSCAPE_INVERTED));
441 SetScreenRotation(ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT), withAnimation);
445 SetScreenRotation(ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_PORTRAIT_INVERTED),
450 SetScreenRotation(ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_LANDSCAPE), withAnimation);
454 SetScreenRotation(ConvertDeviceToDisplayRotation(DeviceRotation::ROTATION_LANDSCAPE_INVERTED),