Index: content/browser/screen_orientation/screen_orientation_service_impl.h |
diff --git a/content/browser/screen_orientation/screen_orientation_service_impl.h b/content/browser/screen_orientation/screen_orientation_service_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7f982c36ce0edd83ed520540bb6e06cb7bb67f33 |
--- /dev/null |
+++ b/content/browser/screen_orientation/screen_orientation_service_impl.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_SERVICE_IMPL_H |
+#define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_SERVICE_IMPL_H |
+ |
+#include "base/callback.h" |
+#include "base/memory/weak_ptr.h" |
+#include "content/common/screen_orientation_service.mojom.h" |
+#include "mojo/public/cpp/bindings/strong_binding.h" |
+ |
+namespace content { |
+ |
+class ScreenOrientationProvider; |
+ |
+class ScreenOrientationServiceImpl : public mojom::ScreenOrientationService { |
+ public: |
+ static void Create(ScreenOrientationProvider* provider, |
+ mojom::ScreenOrientationServiceRequest request); |
+ |
+ private: |
+ ScreenOrientationServiceImpl(ScreenOrientationProvider* provider, |
+ mojom::ScreenOrientationServiceRequest request); |
+ ~ScreenOrientationServiceImpl() override; |
+ |
+ // ScreenOrientationService: |
+ void LockOrientation(blink::WebScreenOrientationLockType orientation, |
+ const LockOrientationCallback& callback) override; |
+ void UnlockOrientation() override; |
+ |
+ void NotifyLockResult(mojom::ScreenOrientationLockResult result); |
+ |
+ ScreenOrientationProvider* provider_; |
+ LockOrientationCallback on_result_callback_; |
+ mojo::Binding<mojom::ScreenOrientationService> binding_; |
+ base::WeakPtrFactory<ScreenOrientationServiceImpl> weak_factory_; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_SERVICE_IMPL_H |