OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/public/interfaces/volume.mojom.h" | 8 #include "ash/public/interfaces/volume.mojom.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "mojo/public/cpp/bindings/binding_set.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
11 | 11 |
12 // Controls the volume when F8-10 or a multimedia key for volume is pressed. | 12 // Controls the volume when F8-10 or a multimedia key for volume is pressed. |
msw
2016/12/05 20:15:09
optional nit: add a TODO about broken accelerators
James Cook
2016/12/06 19:23:57
Done.
| |
13 class VolumeController : public ash::mojom::VolumeController { | 13 class VolumeController : public ash::mojom::VolumeClient { |
msw
2016/12/05 20:15:09
Yeah, the controller implementing a client, just d
James Cook
2016/12/06 19:23:57
Done.
| |
14 public: | 14 public: |
15 VolumeController(); | 15 VolumeController(); |
16 ~VolumeController() override; | 16 ~VolumeController() override; |
17 | 17 |
18 // Binds the mojom::VolumeController interface request to this object. | 18 // Overridden from ash::mojom::VolumeClient: |
19 void BindRequest(ash::mojom::VolumeControllerRequest request); | |
20 | |
21 // Overridden from ash::mojom::VolumeController: | |
22 void VolumeMute() override; | 19 void VolumeMute() override; |
23 void VolumeDown() override; | 20 void VolumeDown() override; |
24 void VolumeUp() override; | 21 void VolumeUp() override; |
25 | 22 |
26 private: | 23 private: |
27 mojo::BindingSet<ash::mojom::VolumeController> bindings_; | 24 mojo::Binding<ash::mojom::VolumeClient> binding_; |
28 | 25 |
29 DISALLOW_COPY_AND_ASSIGN(VolumeController); | 26 DISALLOW_COPY_AND_ASSIGN(VolumeController); |
30 }; | 27 }; |
31 | 28 |
32 #endif // CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_CHROMEOS_H_ | 29 #endif // CHROME_BROWSER_UI_ASH_VOLUME_CONTROLLER_H_ |
OLD | NEW |