OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_H | 5 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_H |
6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_H | 6 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_H |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "content/public/browser/web_contents_binding_set.h" | 9 #include "content/public/browser/web_contents_binding_set.h" |
10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 ScreenOrientationProvider* GetScreenOrientationProvider(); | 24 ScreenOrientationProvider* GetScreenOrientationProvider(); |
25 | 25 |
26 private: | 26 private: |
27 // ScreenOrientation: | 27 // ScreenOrientation: |
28 void LockOrientation(blink::WebScreenOrientationLockType orientation, | 28 void LockOrientation(blink::WebScreenOrientationLockType orientation, |
29 const LockOrientationCallback& callback) override; | 29 const LockOrientationCallback& callback) override; |
30 void UnlockOrientation() override; | 30 void UnlockOrientation() override; |
31 | 31 |
32 // WebContentsObserver: | 32 // WebContentsObserver: |
33 void DidNavigateMainFrame(const LoadCommittedDetails& details, | 33 void DidFinishNavigation(NavigationHandle* navigation_handle) override; |
34 const FrameNavigateParams& params) override; | |
35 | 34 |
36 std::unique_ptr<ScreenOrientationProvider> provider_; | 35 std::unique_ptr<ScreenOrientationProvider> provider_; |
37 WebContentsFrameBindingSet<device::mojom::ScreenOrientation> bindings_; | 36 WebContentsFrameBindingSet<device::mojom::ScreenOrientation> bindings_; |
38 base::WeakPtrFactory<ScreenOrientation> weak_factory_; | 37 base::WeakPtrFactory<ScreenOrientation> weak_factory_; |
39 }; | 38 }; |
40 | 39 |
41 } // namespace content | 40 } // namespace content |
42 | 41 |
43 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_H | 42 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_H |
OLD | NEW |