Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: content/browser/screen_orientation/screen_orientation_dispatcher_host.h

Issue 513073002: Add SetProvider function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/screen_orientation/screen_orientation_dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 25 matching lines...) Expand all
36 // |request_id| matches the |current_lock_|. 36 // |request_id| matches the |current_lock_|.
37 void NotifyLockSuccess(int request_id); 37 void NotifyLockSuccess(int request_id);
38 38
39 // Notifies that the lock with the given |request_id| has failed. 39 // Notifies that the lock with the given |request_id| has failed.
40 // The renderer process will be notified that the lock succeeded only if 40 // The renderer process will be notified that the lock succeeded only if
41 // |request_id| matches the |current_lock_|. 41 // |request_id| matches the |current_lock_|.
42 void NotifyLockError(int request_id, blink::WebLockOrientationError error); 42 void NotifyLockError(int request_id, blink::WebLockOrientationError error);
43 43
44 void OnOrientationChange(); 44 void OnOrientationChange();
45 45
46 void SetProvider(ScreenOrientationProvider* provider);
47
46 private: 48 private:
47 void OnLockRequest(RenderFrameHost* render_frame_host, 49 void OnLockRequest(RenderFrameHost* render_frame_host,
48 blink::WebScreenOrientationLockType orientation, 50 blink::WebScreenOrientationLockType orientation,
49 int request_id); 51 int request_id);
50 void OnUnlockRequest(RenderFrameHost* render_frame_host); 52 void OnUnlockRequest(RenderFrameHost* render_frame_host);
51 53
52 // Returns a RenderFrameHost if the request_id is still valid and the 54 // Returns a RenderFrameHost if the request_id is still valid and the
53 // associated RenderFrameHost still exists. Returns NULL otherwise. 55 // associated RenderFrameHost still exists. Returns NULL otherwise.
54 RenderFrameHost* GetRenderFrameHostForRequestID(int request_id); 56 RenderFrameHost* GetRenderFrameHostForRequestID(int request_id);
55 57
(...skipping 12 matching lines...) Expand all
68 }; 70 };
69 // current_lock_ will be NULL if there are no current lock. 71 // current_lock_ will be NULL if there are no current lock.
70 LockInformation* current_lock_; 72 LockInformation* current_lock_;
71 73
72 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcherHost); 74 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcherHost);
73 }; 75 };
74 76
75 } // namespace content 77 } // namespace content
76 78
77 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_ H_ 79 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_ H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/screen_orientation/screen_orientation_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698