summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorphweiss <phweiss@chromium.org>2015-11-17 04:56:18 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-17 12:56:59 +0000
commit0bf64c504eb4e7c22daad3518427c3dfc6cd00d4 (patch)
tree31df3d62b549234ed96c73a65d7a581afa3c0842 /components
parent449769316764e3922e50920bb62b186221301e47 (diff)
downloadchromium_src-0bf64c504eb4e7c22daad3518427c3dfc6cd00d4.zip
chromium_src-0bf64c504eb4e7c22daad3518427c3dfc6cd00d4.tar.gz
chromium_src-0bf64c504eb4e7c22daad3518427c3dfc6cd00d4.tar.bz2
Implement device policy DisplayRotationDefault
The policy affects all displays on every reboot and when it changes its value. The user is able to rotate the display to a different orientation any time, but will have to do so on every reboot while the policy is in effect. It is enforced by the new class DisplayRotationDefaultHandler, which is created in the PreInit()-method of ChromeShellDelegate. It registers itself as observer with the WindowTreeHostManager for display changes, and with CrosSettings for policy changes. It is destroyed via the new OnShutdown()-function of WindowTreeHostManager::Observer. BUG=499842 TEST=browsertest Review URL: https://codereview.chromium.org/1388353002 Cr-Commit-Position: refs/heads/master@{#360069}
Diffstat (limited to 'components')
-rw-r--r--components/policy/resources/policy_templates.json54
1 files changed, 53 insertions, 1 deletions
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json
index ef935c1..046a437 100644
--- a/components/policy/resources/policy_templates.json
+++ b/components/policy/resources/policy_templates.json
@@ -134,7 +134,7 @@
# persistent IDs for all fields (but not for groups!) are needed. These are
# specified by the 'id' keys of each policy. NEVER CHANGE EXISTING IDs,
# because doing so would break the deployed wire format!
-# For your editing convenience: highest ID currently used: 310
+# For your editing convenience: highest ID currently used: 311
#
# Placeholders:
# The following placeholder strings are automatically substituted:
@@ -8002,6 +8002,58 @@
If this policy is set to false or unset, Unified Desktop will be
disabled. In this case, the user cannot enable the feature.''',
},
+ {
+ 'name': 'DisplayRotationDefault',
+ 'type': 'int-enum',
+ 'schema': {
+ 'type': 'integer',
+ 'enum': [ 0, 1, 2, 3 ],
+ },
+ 'items': [
+ {
+ 'name': 'ROTATE_0',
+ 'value': 0,
+ 'caption': '''Rotate screen by 0 degrees''',
+ },
+ {
+ 'name': 'ROTATE_90',
+ 'value': 1,
+ 'caption': '''Rotate screen clockwise by 90 degrees''',
+ },
+ {
+ 'name': 'ROTATE_180',
+ 'value': 2,
+ 'caption': '''Rotate screen by 180 degrees''',
+ },
+ {
+ 'name': 'ROTATE_270',
+ 'value': 3,
+ 'caption': '''Rotate screen clockwise by 270 degrees''',
+ },
+ ],
+ 'supported_on': ['chrome_os:48-'],
+ 'device_only': True,
+ 'features': {
+ 'can_be_recommended': False,
+ 'dynamic_refresh': True,
+ 'per_profile': False,
+ },
+ 'example_value': 1,
+ 'id': 311,
+ 'caption': '''Set default display rotation, reapplied on every reboot''',
+ 'tags': [],
+ 'desc': '''If this policy is set, each display is rotated to the
+ specified orientation on every reboot, and the first time it is connected
+ after the policy value has changed. Users may change the display
+ rotation via the settings page after logging in, but their
+ setting will be overridden by the policy value at the next reboot.
+
+ This policy applies to both the primary and all secondary displays.
+
+ If the policy is not set, the default value is 0 degrees and the user is
+ free to change it. In this case, the default value is not reapplied at
+ restart.''',
+ },
],
'messages': {
# Messages that are not associated to any policies.