Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include <memory> | |
| 6 #include <string> | |
| 7 #include <vector> | |
| 8 | |
| 9 #include "content/common/content_export.h" | |
| 10 #include "mojo/public/cpp/bindings/binding.h" | |
| 11 #include "third_party/WebKit/public/platform/modules/keyboard_lock/keyboard_lock .mojom.h" | |
| 12 | |
| 13 namespace content { | |
| 14 | |
| 15 class RenderFrameHost; | |
| 16 | |
| 17 class CONTENT_EXPORT KeyboardLockServiceImpl | |
| 18 : public NON_EXPORTED_BASE(blink::mojom::KeyboardLockService) { | |
| 19 public: | |
| 20 ~KeyboardLockServiceImpl() override; | |
| 21 | |
| 22 static void CreateMojoService( | |
| 23 RenderFrameHost* render_frame_host, | |
| 24 blink::mojom::KeyboardLockServiceRequest request); | |
| 25 | |
| 26 void RequestKeyLock(const std::vector<std::string>& key_codes, | |
| 27 const RequestKeyLockCallback& callback) override; | |
| 28 void CancelKeyLock(const CancelKeyLockCallback& callback) override; | |
| 29 | |
| 30 private: | |
| 31 KeyboardLockServiceImpl(); | |
| 32 | |
| 33 std::unique_ptr<mojo::Binding<blink::mojom::KeyboardLockService>> binding_; | |
|
dcheng
2017/04/17 23:07:52
Just use mojo::Binding<> directly, no need to have
Hzj_jie
2017/04/18 02:26:07
Done.
| |
| 34 }; | |
| 35 | |
| 36 } // namespace | |
| OLD | NEW |