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 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_ |
| 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
| 9 #include "content/public/browser/render_frame_host.h" | 9 #include "content/public/browser/render_frame_host.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 blink::WebScreenOrientationLockType orientation, | 41 blink::WebScreenOrientationLockType orientation, |
| 42 int request_id); | 42 int request_id); |
| 43 void OnUnlockRequest(RenderFrameHost* render_frame_host); | 43 void OnUnlockRequest(RenderFrameHost* render_frame_host); |
| 44 | 44 |
| 45 // Returns a RenderFrameHost if the request_id is still valid and the | 45 // Returns a RenderFrameHost if the request_id is still valid and the |
| 46 // associated RenderFrameHost still exists. Returns NULL otherwise. | 46 // associated RenderFrameHost still exists. Returns NULL otherwise. |
| 47 RenderFrameHost* GetRenderFrameHostForRequestID(int request_id); | 47 RenderFrameHost* GetRenderFrameHostForRequestID(int request_id); |
| 48 | 48 |
| 49 void ResetCurrentLock(); | 49 void ResetCurrentLock(); |
| 50 | 50 |
| 51 // Like NotifyLockError(int, blink::WebLockOrientationError but expected to be | |
| 52 // used internally when the RenderFrameHost is known. | |
|
Michael van Ouwerkerk
2014/08/07 10:34:12
This comment seems brittle, I don't like the way i
| |
| 53 void NotifyLockError(int request_id, | |
| 54 RenderFrameHost* render_frame_host, | |
| 55 blink::WebLockOrientationError error); | |
| 56 | |
| 51 scoped_ptr<ScreenOrientationProvider> provider_; | 57 scoped_ptr<ScreenOrientationProvider> provider_; |
| 52 | 58 |
| 53 struct LockInformation { | 59 struct LockInformation { |
| 54 LockInformation(int request_id, int process_id, int routing_id); | 60 LockInformation(int request_id, int process_id, int routing_id); |
| 55 int request_id; | 61 int request_id; |
| 56 int process_id; | 62 int process_id; |
| 57 int routing_id; | 63 int routing_id; |
| 58 }; | 64 }; |
| 59 // current_lock_ will be NULL if there are no current lock. | 65 // current_lock_ will be NULL if there are no current lock. |
| 60 LockInformation* current_lock_; | 66 LockInformation* current_lock_; |
| 61 | 67 |
| 62 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcherHost); | 68 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcherHost); |
| 63 }; | 69 }; |
| 64 | 70 |
| 65 } // namespace content | 71 } // namespace content |
| 66 | 72 |
| 67 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_ H_ | 73 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_ H_ |
| OLD | NEW |