| OLD | NEW |
| 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.h" | 5 #include "content/browser/screen_orientation/screen_orientation.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "content/public/browser/navigation_details.h" | 9 #include "content/public/browser/navigation_details.h" |
| 10 #include "content/public/browser/screen_orientation_provider.h" | 10 #include "content/public/browser/screen_orientation_provider.h" |
| 11 #include "content/public/browser/web_contents.h" | 11 #include "content/public/browser/web_contents.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 using LockResult = blink::mojom::ScreenOrientationLockResult; | 15 using LockResult = device::mojom::ScreenOrientationLockResult; |
| 16 | 16 |
| 17 ScreenOrientation::ScreenOrientation(WebContents* web_contents) | 17 ScreenOrientation::ScreenOrientation(WebContents* web_contents) |
| 18 : WebContentsObserver(web_contents), | 18 : WebContentsObserver(web_contents), |
| 19 bindings_(web_contents, this), | 19 bindings_(web_contents, this), |
| 20 weak_factory_(this) { | 20 weak_factory_(this) { |
| 21 provider_.reset(new ScreenOrientationProvider(web_contents)); | 21 provider_.reset(new ScreenOrientationProvider(web_contents)); |
| 22 } | 22 } |
| 23 | 23 |
| 24 ScreenOrientation::~ScreenOrientation() = default; | 24 ScreenOrientation::~ScreenOrientation() = default; |
| 25 | 25 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 return; | 57 return; |
| 58 | 58 |
| 59 base::ResetAndReturn(&on_result_callback_).Run(result); | 59 base::ResetAndReturn(&on_result_callback_).Run(result); |
| 60 } | 60 } |
| 61 | 61 |
| 62 ScreenOrientationProvider* ScreenOrientation::GetScreenOrientationProvider() { | 62 ScreenOrientationProvider* ScreenOrientation::GetScreenOrientationProvider() { |
| 63 return provider_.get(); | 63 return provider_.get(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace content | 66 } // namespace content |
| OLD | NEW |