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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/signin/easy_unlock_notification_controller_chromeos.h
diff --git a/chrome/browser/signin/easy_unlock_notification_controller_chromeos.h b/chrome/browser/signin/easy_unlock_notification_controller_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..57d59160cdce8e28c897af398686c1b824147dfa
--- /dev/null
+++ b/chrome/browser/signin/easy_unlock_notification_controller_chromeos.h
@@ -0,0 +1,57 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SIGNIN_EASY_UNLOCK_NOTIFICATION_CONTROLLER_CHROMEOS_H_
+#define CHROME_BROWSER_SIGNIN_EASY_UNLOCK_NOTIFICATION_CONTROLLER_CHROMEOS_H_
+
+#include <memory>
+#include <string>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "chrome/browser/signin/easy_unlock_notification_controller.h"
+#include "ui/message_center/message_center.h"
+#include "ui/message_center/message_center_observer.h"
+#include "ui/message_center/notification.h"
+
+class Profile;
+
+// Implementation of EasyUnlockNotificationController for ChromeOS.
+class EasyUnlockNotificationControllerChromeOS
+ : public EasyUnlockNotificationController,
+ public message_center::MessageCenterObserver {
+ public:
+ EasyUnlockNotificationControllerChromeOS(
+ Profile* profile,
+ message_center::MessageCenter* message_center);
+ ~EasyUnlockNotificationControllerChromeOS() override;
+
+ // EasyUnlockNotificationController:
+ void ShowChromebookAddedNotification() override;
+ void ShowPairingChangeNotification() override;
+ void ShowPairingChangeAppliedNotification(
+ const std::string& phone_name) override;
+
+ protected:
+ // Exposed for testing
+ virtual void LaunchEasyUnlockSettings();
+ virtual void LockScreen();
+
+ private:
+ // message_center::MessageCenterObserver:
+ void OnNotificationClicked(const std::string& notification_id) override;
+ void OnNotificationButtonClicked(const std::string& notification_id,
+ int button_index) override;
+
+ void ShowNotification(
+ std::unique_ptr<message_center::Notification> notification);
+
+ Profile* profile_;
+
+ message_center::MessageCenter* message_center_;
+
+ DISALLOW_COPY_AND_ASSIGN(EasyUnlockNotificationControllerChromeOS);
+};
+
+#endif // CHROME_BROWSER_SIGNIN_EASY_UNLOCK_NOTIFICATION_CONTROLLER_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698