| 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_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_IM
PL_H_ | 5 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_IM
PL_H_ |
| 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_IM
PL_H_ | 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_IM
PL_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/screen_orientation_dispatcher_host.h" | 8 #include "content/public/browser/screen_orientation_dispatcher_host.h" |
| 9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
| 10 #include "third_party/WebKit/public/platform/WebLockOrientationError.h" | 10 #include "third_party/WebKit/public/platform/WebLockOrientationError.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // ScreenOrientationDispatcherHost: | 29 // ScreenOrientationDispatcherHost: |
| 30 virtual void NotifyLockSuccess(int request_id) OVERRIDE; | 30 virtual void NotifyLockSuccess(int request_id) OVERRIDE; |
| 31 virtual void NotifyLockError(int request_id, | 31 virtual void NotifyLockError(int request_id, |
| 32 blink::WebLockOrientationError error) OVERRIDE; | 32 blink::WebLockOrientationError error) OVERRIDE; |
| 33 virtual void OnOrientationChange() OVERRIDE; | 33 virtual void OnOrientationChange() OVERRIDE; |
| 34 | 34 |
| 35 // WebContentsObserver: | 35 // WebContentsObserver: |
| 36 virtual bool OnMessageReceived(const IPC::Message&, | 36 virtual bool OnMessageReceived(const IPC::Message&, |
| 37 RenderFrameHost* render_frame_host) OVERRIDE; | 37 RenderFrameHost* render_frame_host) OVERRIDE; |
| 38 virtual void DidNavigateMainFrame(const LoadCommittedDetails& details, |
| 39 const FrameNavigateParams& params) OVERRIDE; |
| 38 | 40 |
| 39 private: | 41 private: |
| 40 void OnLockRequest(RenderFrameHost* render_frame_host, | 42 void OnLockRequest(RenderFrameHost* render_frame_host, |
| 41 blink::WebScreenOrientationLockType orientation, | 43 blink::WebScreenOrientationLockType orientation, |
| 42 int request_id); | 44 int request_id); |
| 43 void OnUnlockRequest(RenderFrameHost* render_frame_host); | 45 void OnUnlockRequest(RenderFrameHost* render_frame_host); |
| 44 | 46 |
| 45 // Returns a RenderFrameHost if the request_id is still valid and the | 47 // Returns a RenderFrameHost if the request_id is still valid and the |
| 46 // associated RenderFrameHost still exists. Returns NULL otherwise. | 48 // associated RenderFrameHost still exists. Returns NULL otherwise. |
| 47 RenderFrameHost* GetRenderFrameHostForRequestID(int request_id); | 49 RenderFrameHost* GetRenderFrameHostForRequestID(int request_id); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 61 }; | 63 }; |
| 62 // current_lock_ will be NULL if there are no current lock. | 64 // current_lock_ will be NULL if there are no current lock. |
| 63 LockInformation* current_lock_; | 65 LockInformation* current_lock_; |
| 64 | 66 |
| 65 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcherHostImpl); | 67 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcherHostImpl); |
| 66 }; | 68 }; |
| 67 | 69 |
| 68 } // namespace content | 70 } // namespace content |
| 69 | 71 |
| 70 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_
IMPL_H_ | 72 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_
IMPL_H_ |
| OLD | NEW |