| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/callback.h" |
| 6 #include "base/memory/weak_ptr.h" |
| 7 #include "content/common/screen_orientation_service.mojom.h" |
| 8 |
| 9 #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_SERVICE_IMPL_H_ |
| 10 #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_SERVICE_IMPL_H_ |
| 11 |
| 12 namespace content { |
| 13 |
| 14 class ScreenOrientationProvider; |
| 15 |
| 16 class ScreenOrientationServiceImpl |
| 17 : public mojo::InterfaceImpl<ScreenOrientationService> { |
| 18 public: |
| 19 static void Create(ScreenOrientationProvider* provider, |
| 20 mojo::InterfaceRequest<ScreenOrientationService> request); |
| 21 |
| 22 private: |
| 23 ScreenOrientationServiceImpl(ScreenOrientationProvider* provider); |
| 24 virtual ~ScreenOrientationServiceImpl(); |
| 25 |
| 26 void NotifyLockResult(ScreenOrientationLockResult result); |
| 27 |
| 28 // ScreenOrientationService: |
| 29 virtual void LockOrientation( |
| 30 ScreenOrientationLockType lock_type, |
| 31 const mojo::Callback<void(ScreenOrientationLockResult)>& callback) |
| 32 OVERRIDE; |
| 33 virtual void UnlockOrientation() OVERRIDE; |
| 34 |
| 35 ScreenOrientationProvider* provider_; |
| 36 mojo::Callback<void(ScreenOrientationLockResult)> on_result_callback_; |
| 37 base::WeakPtrFactory<ScreenOrientationServiceImpl> weak_factory_; |
| 38 }; |
| 39 |
| 40 } // namespace content |
| 41 |
| 42 #endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_SERVICE_IMPL_H_ |
| OLD | NEW |