OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/screen_orientation_delegate_chromeos.h" | 5 #include "ash/content/screen_orientation_delegate_chromeos.h" |
6 | 6 |
7 #include "ash/common/wm_window.h" | |
8 #include "ash/display/screen_orientation_controller_chromeos.h" | 7 #include "ash/display/screen_orientation_controller_chromeos.h" |
9 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/wm_window.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 | 13 |
14 ScreenOrientationDelegateChromeos::ScreenOrientationDelegateChromeos() { | 14 ScreenOrientationDelegateChromeos::ScreenOrientationDelegateChromeos() { |
15 content::WebContents::SetScreenOrientationDelegate(this); | 15 content::WebContents::SetScreenOrientationDelegate(this); |
16 } | 16 } |
17 | 17 |
18 ScreenOrientationDelegateChromeos::~ScreenOrientationDelegateChromeos() { | 18 ScreenOrientationDelegateChromeos::~ScreenOrientationDelegateChromeos() { |
19 content::WebContents::SetScreenOrientationDelegate(nullptr); | 19 content::WebContents::SetScreenOrientationDelegate(nullptr); |
(...skipping 21 matching lines...) Expand all Loading... |
41 | 41 |
42 void ScreenOrientationDelegateChromeos::Unlock( | 42 void ScreenOrientationDelegateChromeos::Unlock( |
43 content::WebContents* web_contents) { | 43 content::WebContents* web_contents) { |
44 Shell::GetInstance() | 44 Shell::GetInstance() |
45 ->screen_orientation_controller() | 45 ->screen_orientation_controller() |
46 ->UnlockOrientationForWindow( | 46 ->UnlockOrientationForWindow( |
47 WmWindow::Get(web_contents->GetNativeView())); | 47 WmWindow::Get(web_contents->GetNativeView())); |
48 } | 48 } |
49 | 49 |
50 } // namespace ash | 50 } // namespace ash |
OLD | NEW |