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

Side by Side Diff: content/browser/screen_orientation/screen_orientation_delegate_win.cc

Issue 2682643002: [ScreenOrientation] Hide ScreenOrientationProvider inside WebContentsImpl. (Closed)
Patch Set: Rebase only Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/browser/screen_orientation/screen_orientation_delegate_win.h" 5 #include "content/browser/screen_orientation/screen_orientation_delegate_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "content/public/browser/screen_orientation_provider.h" 9 #include "content/browser/screen_orientation/screen_orientation_provider.h"
10 10
11 namespace { 11 namespace {
12 12
13 // SetDisplayAutoRotationPreferences is available on Windows 8 and after. 13 // SetDisplayAutoRotationPreferences is available on Windows 8 and after.
14 void SetDisplayAutoRotationPreferencesWrapper( 14 void SetDisplayAutoRotationPreferencesWrapper(
15 ORIENTATION_PREFERENCE orientation) { 15 ORIENTATION_PREFERENCE orientation) {
16 using SetDisplayAutoRotationPreferencesPtr = 16 using SetDisplayAutoRotationPreferencesPtr =
17 void(WINAPI*)(ORIENTATION_PREFERENCE); 17 void(WINAPI*)(ORIENTATION_PREFERENCE);
18 static SetDisplayAutoRotationPreferencesPtr 18 static SetDisplayAutoRotationPreferencesPtr
19 set_display_auto_rotation_preferences_func = 19 set_display_auto_rotation_preferences_func =
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 !(auto_rotation_state & AR_NOSENSOR) && 124 !(auto_rotation_state & AR_NOSENSOR) &&
125 !(auto_rotation_state & AR_NOT_SUPPORTED) && 125 !(auto_rotation_state & AR_NOT_SUPPORTED) &&
126 !(auto_rotation_state & AR_MULTIMON)); 126 !(auto_rotation_state & AR_MULTIMON));
127 } 127 }
128 128
129 void ScreenOrientationDelegateWin::Unlock(WebContents* web_contents) { 129 void ScreenOrientationDelegateWin::Unlock(WebContents* web_contents) {
130 SetDisplayAutoRotationPreferencesWrapper(ORIENTATION_PREFERENCE_NONE); 130 SetDisplayAutoRotationPreferencesWrapper(ORIENTATION_PREFERENCE_NONE);
131 } 131 }
132 132
133 } // namespace content 133 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698