Index: content/browser/keyboard_lock/keyboard_lock_service_impl.h |
diff --git a/content/browser/keyboard_lock/keyboard_lock_service_impl.h b/content/browser/keyboard_lock/keyboard_lock_service_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8c53c9555e9cc2f379ed7aa2bae891225890b20e |
--- /dev/null |
+++ b/content/browser/keyboard_lock/keyboard_lock_service_impl.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2017 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. |
+ |
+#include <string> |
+#include <vector> |
+ |
+#include "content/common/content_export.h" |
+#include "mojo/public/cpp/bindings/binding.h" |
+#include "third_party/WebKit/public/platform/modules/keyboard_lock/keyboard_lock.mojom.h" |
+ |
+namespace content { |
+ |
+class RenderFrameHost; |
+ |
+class CONTENT_EXPORT KeyboardLockServiceImpl |
+ : public NON_EXPORTED_BASE(blink::mojom::KeyboardLockService) { |
+ public: |
+ ~KeyboardLockServiceImpl() override; |
+ |
+ static void CreateMojoService( |
+ RenderFrameHost* render_frame_host, |
+ blink::mojom::KeyboardLockServiceRequest request); |
+ |
+ void RequestKeyLock(const std::vector<std::string>& key_codes, |
dcheng
2017/04/26 13:27:17
Nit: Add a comment like
// blink::mojom::Keyboard
Hzj_jie
2017/04/26 22:05:56
Done.
|
+ const RequestKeyLockCallback& callback) override; |
+ void CancelKeyLock() override; |
+ |
+ private: |
+ explicit KeyboardLockServiceImpl( |
+ blink::mojom::KeyboardLockServiceRequest request); |
+ |
+ const mojo::Binding<blink::mojom::KeyboardLockService> binding_; |
+}; |
+ |
+} // namespace |