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

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

Issue 2868843002: Use OnceCallback on Mojo interfaces in //device/screen_orientation (Closed)
Patch Set: rebase Created 3 years, 7 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_provider.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_PROVIDER_H_ 5 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_
6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 15 matching lines...) Expand all
26 class CONTENT_EXPORT ScreenOrientationProvider 26 class CONTENT_EXPORT ScreenOrientationProvider
27 : NON_EXPORTED_BASE(public device::mojom::ScreenOrientation), 27 : NON_EXPORTED_BASE(public device::mojom::ScreenOrientation),
28 public WebContentsObserver { 28 public WebContentsObserver {
29 public: 29 public:
30 ScreenOrientationProvider(WebContents* web_contents); 30 ScreenOrientationProvider(WebContents* web_contents);
31 31
32 ~ScreenOrientationProvider() override; 32 ~ScreenOrientationProvider() override;
33 33
34 // device::mojom::ScreenOrientation: 34 // device::mojom::ScreenOrientation:
35 void LockOrientation(blink::WebScreenOrientationLockType orientation, 35 void LockOrientation(blink::WebScreenOrientationLockType orientation,
36 const LockOrientationCallback& callback) override; 36 LockOrientationCallback callback) override;
37 void UnlockOrientation() override; 37 void UnlockOrientation() override;
38 38
39 // Inform about a screen orientation update. It is called to let the provider 39 // Inform about a screen orientation update. It is called to let the provider
40 // know if a lock has been resolved. 40 // know if a lock has been resolved.
41 void OnOrientationChange(); 41 void OnOrientationChange();
42 42
43 // Provide a delegate which creates delegates for platform implementations. 43 // Provide a delegate which creates delegates for platform implementations.
44 // The delegate is not owned by ScreenOrientationProvider. 44 // The delegate is not owned by ScreenOrientationProvider.
45 static void SetDelegate(ScreenOrientationDelegate* delegate_); 45 static void SetDelegate(ScreenOrientationDelegate* delegate_);
46 46
(...skipping 29 matching lines...) Expand all
76 LockOrientationCallback pending_callback_; 76 LockOrientationCallback pending_callback_;
77 77
78 WebContentsFrameBindingSet<device::mojom::ScreenOrientation> bindings_; 78 WebContentsFrameBindingSet<device::mojom::ScreenOrientation> bindings_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider); 80 DISALLOW_COPY_AND_ASSIGN(ScreenOrientationProvider);
81 }; 81 };
82 82
83 } // namespace content 83 } // namespace content
84 84
85 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_ 85 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/screen_orientation/screen_orientation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698