OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "device/vibration/vibration_manager_impl.h" | 5 #include "device/vibration/vibration_manager_impl.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include <stdint.h> |
| 8 |
8 #include "mojo/public/cpp/bindings/strong_binding.h" | 9 #include "mojo/public/cpp/bindings/strong_binding.h" |
9 | 10 |
10 namespace device { | 11 namespace device { |
11 | 12 |
12 namespace { | 13 namespace { |
13 | 14 |
14 class VibrationManagerEmptyImpl : public VibrationManager { | 15 class VibrationManagerEmptyImpl : public VibrationManager { |
15 public: | 16 public: |
16 void Vibrate(int64 milliseconds) override {} | 17 void Vibrate(int64_t milliseconds) override {} |
17 void Cancel() override {} | 18 void Cancel() override {} |
18 | 19 |
19 private: | 20 private: |
20 friend VibrationManagerImpl; | 21 friend VibrationManagerImpl; |
21 | 22 |
22 explicit VibrationManagerEmptyImpl( | 23 explicit VibrationManagerEmptyImpl( |
23 mojo::InterfaceRequest<VibrationManager> request) | 24 mojo::InterfaceRequest<VibrationManager> request) |
24 : binding_(this, request.Pass()) {} | 25 : binding_(this, request.Pass()) {} |
25 ~VibrationManagerEmptyImpl() override {} | 26 ~VibrationManagerEmptyImpl() override {} |
26 | 27 |
27 // The binding between this object and the other end of the pipe. | 28 // The binding between this object and the other end of the pipe. |
28 mojo::StrongBinding<VibrationManager> binding_; | 29 mojo::StrongBinding<VibrationManager> binding_; |
29 }; | 30 }; |
30 | 31 |
31 } // namespace | 32 } // namespace |
32 | 33 |
33 // static | 34 // static |
34 void VibrationManagerImpl::Create( | 35 void VibrationManagerImpl::Create( |
35 mojo::InterfaceRequest<VibrationManager> request) { | 36 mojo::InterfaceRequest<VibrationManager> request) { |
36 new VibrationManagerEmptyImpl(request.Pass()); | 37 new VibrationManagerEmptyImpl(request.Pass()); |
37 } | 38 } |
38 | 39 |
39 } // namespace device | 40 } // namespace device |
OLD | NEW |