Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/public/browser/screen_orientation_provider.h" | 5 #include "content/public/browser/screen_orientation_provider.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/optional.h" | 8 #include "base/optional.h" |
| 9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
| 11 #include "content/public/browser/render_widget_host.h" | 11 #include "content/public/browser/render_widget_host.h" |
| 12 #include "content/public/browser/screen_orientation_delegate.h" | 12 #include "content/public/browser/screen_orientation_delegate.h" |
| 13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO rientationError.h" | 14 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO rientationError.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 using ::blink::mojom::ScreenOrientationLockResult; | 18 using ::device::mojom::ScreenOrientationLockResult; |
|
blundell
2016/12/12 12:30:45
same tiny nit.
leonhsl(Using Gerrit)
2016/12/13 03:39:58
Done.
| |
| 19 | 19 |
| 20 ScreenOrientationDelegate* ScreenOrientationProvider::delegate_ = nullptr; | 20 ScreenOrientationDelegate* ScreenOrientationProvider::delegate_ = nullptr; |
| 21 | 21 |
| 22 ScreenOrientationProvider::ScreenOrientationProvider(WebContents* web_contents) | 22 ScreenOrientationProvider::ScreenOrientationProvider(WebContents* web_contents) |
| 23 : WebContentsObserver(web_contents), lock_applied_(false) {} | 23 : WebContentsObserver(web_contents), lock_applied_(false) {} |
| 24 | 24 |
| 25 ScreenOrientationProvider::~ScreenOrientationProvider() { | 25 ScreenOrientationProvider::~ScreenOrientationProvider() { |
| 26 } | 26 } |
| 27 | 27 |
| 28 void ScreenOrientationProvider::LockOrientation( | 28 void ScreenOrientationProvider::LockOrientation( |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 case blink::WebScreenOrientationLockDefault: | 201 case blink::WebScreenOrientationLockDefault: |
| 202 NOTREACHED(); | 202 NOTREACHED(); |
| 203 return false; | 203 return false; |
| 204 } | 204 } |
| 205 | 205 |
| 206 NOTREACHED(); | 206 NOTREACHED(); |
| 207 return false; | 207 return false; |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace content | 210 } // namespace content |
| OLD | NEW |