| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 10 #include "third_party/WebKit/public/platform/modules/keyboard_lock/keyboard_lock
.mojom.h" | 10 #include "third_party/WebKit/public/platform/modules/keyboard_lock/keyboard_lock
.mojom.h" |
| 11 | 11 |
| 12 namespace service_manager { | 12 namespace service_manager { |
| 13 struct BindSourceInfo; | 13 struct BindSourceInfo; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 | 17 |
| 18 class RenderFrameHost; |
| 19 class WebContents; |
| 20 |
| 18 class CONTENT_EXPORT KeyboardLockServiceImpl | 21 class CONTENT_EXPORT KeyboardLockServiceImpl |
| 19 : public NON_EXPORTED_BASE(blink::mojom::KeyboardLockService) { | 22 : public NON_EXPORTED_BASE(blink::mojom::KeyboardLockService) { |
| 20 public: | 23 public: |
| 21 KeyboardLockServiceImpl(); | 24 KeyboardLockServiceImpl(RenderFrameHost* render_frame_host); |
| 22 ~KeyboardLockServiceImpl() override; | 25 ~KeyboardLockServiceImpl() override; |
| 23 | 26 |
| 24 static void CreateMojoService( | 27 static void CreateMojoService( |
| 28 RenderFrameHost* render_frame_host, |
| 25 const service_manager::BindSourceInfo& source_info, | 29 const service_manager::BindSourceInfo& source_info, |
| 26 blink::mojom::KeyboardLockServiceRequest request); | 30 blink::mojom::KeyboardLockServiceRequest request); |
| 27 | 31 |
| 28 // blink::mojom::KeyboardLockService implementations. | 32 // blink::mojom::KeyboardLockService implementations. |
| 29 void RequestKeyboardLock(const std::vector<std::string>& key_codes, | 33 void RequestKeyboardLock( |
| 30 const RequestKeyboardLockCallback& callback) override; | 34 const std::vector<std::string>& key_codes, |
| 35 const RequestKeyboardLockCallback& callback) override; |
| 31 void CancelKeyboardLock() override; | 36 void CancelKeyboardLock() override; |
| 37 |
| 38 private: |
| 39 WebContents* const web_contents_; |
| 32 }; | 40 }; |
| 33 | 41 |
| 34 } // namespace | 42 } // namespace |
| OLD | NEW |