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

Side by Side Diff: chrome/browser/signin/easy_unlock_notification_controller_chromeos.h

Issue 2968323002: [EasyUnlock] Introduce EasyUnlockNotificationController (Closed)
Patch Set: Notification test. Created 3 years, 5 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 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 #ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_NOTIFICATION_CONTROLLER_CHROMEOS_H_
6 #define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_NOTIFICATION_CONTROLLER_CHROMEOS_H_
7
8 #include <memory>
9 #include <string>
10
11 #include "base/callback.h"
12 #include "base/macros.h"
13 #include "chrome/browser/signin/easy_unlock_notification_controller.h"
14 #include "ui/message_center/message_center.h"
15 #include "ui/message_center/message_center_observer.h"
16 #include "ui/message_center/notification.h"
17
18 class Profile;
19
20 // Implementation of EasyUnlockNotificationController for ChromeOS.
21 class EasyUnlockNotificationControllerChromeOS
22 : public EasyUnlockNotificationController,
23 public message_center::MessageCenterObserver {
24 public:
25 EasyUnlockNotificationControllerChromeOS(
26 Profile* profile,
27 message_center::MessageCenter* message_center);
28 ~EasyUnlockNotificationControllerChromeOS() override;
29
30 // EasyUnlockNotificationController:
31 void ShowChromebookAddedNotification() override;
32 void ShowPairingChangeNotification() override;
33 void ShowPairingChangeAppliedNotification(
34 const std::string& phone_name) override;
35
36 protected:
37 // Exposed for testing
38 virtual void LaunchEasyUnlockSettings();
39 virtual void LockScreen();
40
41 private:
42 // message_center::MessageCenterObserver:
43 void OnNotificationClicked(const std::string& notification_id) override;
44 void OnNotificationButtonClicked(const std::string& notification_id,
45 int button_index) override;
46
47 void ShowNotification(
48 std::unique_ptr<message_center::Notification> notification);
49
50 Profile* profile_;
51
52 message_center::MessageCenter* message_center_;
53
54 DISALLOW_COPY_AND_ASSIGN(EasyUnlockNotificationControllerChromeOS);
55 };
56
57 #endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_NOTIFICATION_CONTROLLER_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698