| 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 #ifndef CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_ |
| 6 #define CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/id_map.h" | 12 #include "base/id_map.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "content/common/screen_orientation.mojom.h" | |
| 15 #include "content/public/renderer/render_frame_observer.h" | 14 #include "content/public/renderer/render_frame_observer.h" |
| 15 #include "device/screen_orientation/public/interfaces/screen_orientation.mojom.h
" |
| 16 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO
rientationCallback.h" | 16 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO
rientationCallback.h" |
| 17 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationClient.h" | 17 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationClient.h" |
| 18 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationLockType.h" | 18 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationLockType.h" |
| 19 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" | 19 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 | 22 |
| 23 using mojom::ScreenOrientationAssociatedPtr; | 23 using device::mojom::ScreenOrientationAssociatedPtr; |
| 24 using ::blink::mojom::ScreenOrientationLockResult; | 24 using device::mojom::ScreenOrientationLockResult; |
| 25 | 25 |
| 26 class RenderFrame; | 26 class RenderFrame; |
| 27 | 27 |
| 28 // ScreenOrientationDispatcher implements the WebScreenOrientationClient API | 28 // ScreenOrientationDispatcher implements the WebScreenOrientationClient API |
| 29 // which handles screen lock. It sends lock (or unlock) requests to the browser | 29 // which handles screen lock. It sends lock (or unlock) requests to the browser |
| 30 // process and listens for responses and let Blink know about the result of the | 30 // process and listens for responses and let Blink know about the result of the |
| 31 // request via WebLockOrientationCallback. | 31 // request via WebLockOrientationCallback. |
| 32 class CONTENT_EXPORT ScreenOrientationDispatcher : | 32 class CONTENT_EXPORT ScreenOrientationDispatcher : |
| 33 public RenderFrameObserver, | 33 public RenderFrameObserver, |
| 34 NON_EXPORTED_BASE(public blink::WebScreenOrientationClient) { | 34 NON_EXPORTED_BASE(public blink::WebScreenOrientationClient) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 CallbackMap pending_callbacks_; | 72 CallbackMap pending_callbacks_; |
| 73 | 73 |
| 74 ScreenOrientationAssociatedPtr screen_orientation_; | 74 ScreenOrientationAssociatedPtr screen_orientation_; |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcher); | 76 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcher); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace content | 79 } // namespace content |
| 80 | 80 |
| 81 #endif // CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_ | 81 #endif // CONTENT_RENDERER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_H_ |
| OLD | NEW |