| 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" | 7 #include "ash/common/wm_window.h" |
| 8 #include "ash/display/screen_orientation_controller_chromeos.h" | 8 #include "ash/display/screen_orientation_controller_chromeos.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "content/public/browser/screen_orientation_provider.h" | |
| 11 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| 12 | 11 |
| 13 namespace ash { | 12 namespace ash { |
| 14 | 13 |
| 15 ScreenOrientationDelegateChromeos::ScreenOrientationDelegateChromeos() { | 14 ScreenOrientationDelegateChromeos::ScreenOrientationDelegateChromeos() { |
| 16 content::ScreenOrientationProvider::SetDelegate(this); | 15 content::WebContents::SetScreenOrientationDelegate(this); |
| 17 } | 16 } |
| 18 | 17 |
| 19 ScreenOrientationDelegateChromeos::~ScreenOrientationDelegateChromeos() { | 18 ScreenOrientationDelegateChromeos::~ScreenOrientationDelegateChromeos() { |
| 20 content::ScreenOrientationProvider::SetDelegate(nullptr); | 19 content::WebContents::SetScreenOrientationDelegate(nullptr); |
| 21 } | 20 } |
| 22 | 21 |
| 23 bool ScreenOrientationDelegateChromeos::FullScreenRequired( | 22 bool ScreenOrientationDelegateChromeos::FullScreenRequired( |
| 24 content::WebContents* web_contents) { | 23 content::WebContents* web_contents) { |
| 25 return true; | 24 return true; |
| 26 } | 25 } |
| 27 | 26 |
| 28 void ScreenOrientationDelegateChromeos::Lock( | 27 void ScreenOrientationDelegateChromeos::Lock( |
| 29 content::WebContents* web_contents, | 28 content::WebContents* web_contents, |
| 30 blink::WebScreenOrientationLockType lock_orientation) { | 29 blink::WebScreenOrientationLockType lock_orientation) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 42 | 41 |
| 43 void ScreenOrientationDelegateChromeos::Unlock( | 42 void ScreenOrientationDelegateChromeos::Unlock( |
| 44 content::WebContents* web_contents) { | 43 content::WebContents* web_contents) { |
| 45 Shell::GetInstance() | 44 Shell::GetInstance() |
| 46 ->screen_orientation_controller() | 45 ->screen_orientation_controller() |
| 47 ->UnlockOrientationForWindow( | 46 ->UnlockOrientationForWindow( |
| 48 WmWindow::Get(web_contents->GetNativeView())); | 47 WmWindow::Get(web_contents->GetNativeView())); |
| 49 } | 48 } |
| 50 | 49 |
| 51 } // namespace ash | 50 } // namespace ash |
| OLD | NEW |