Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: ash/common/system/chromeos/power/dual_role_notification.h

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_POWER_DUAL_ROLE_NOTIFICATION_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_POWER_DUAL_ROLE_NOTIFICATION_H_
7
8 #include <stddef.h>
9
10 #include <memory>
11
12 #include "ash/ash_export.h"
13 #include "ash/common/system/chromeos/power/power_status.h"
14 #include "base/macros.h"
15
16 namespace message_center {
17 class MessageCenter;
18 class Notification;
19 }
20
21 namespace ash {
22
23 // Shows a non-toasting MessageCenter notification based on what dual-role
24 // devices are connected.
25 class ASH_EXPORT DualRoleNotification {
26 public:
27 explicit DualRoleNotification(message_center::MessageCenter* message_center);
28 ~DualRoleNotification();
29
30 // Creates or updates the notification.
31 void Update();
32
33 private:
34 // Creates the notification using the updated status.
35 std::unique_ptr<message_center::Notification> CreateNotification();
36
37 message_center::MessageCenter* message_center_;
38 std::unique_ptr<PowerStatus::PowerSource> dual_role_source_;
39 std::unique_ptr<PowerStatus::PowerSource> dual_role_sink_;
40 size_t num_dual_role_sinks_;
41 bool line_power_connected_;
42
43 DISALLOW_COPY_AND_ASSIGN(DualRoleNotification);
44 };
45
46 } // namespace ash
47
48 #endif // ASH_COMMON_SYSTEM_CHROMEOS_POWER_DUAL_ROLE_NOTIFICATION_H_
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/power/battery_notification.cc ('k') | ash/common/system/chromeos/power/dual_role_notification.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698