Chromium Code Reviews| Index: chrome/browser/chromeos/login/quick_unlock/feature_notification.h |
| diff --git a/chrome/browser/chromeos/login/quick_unlock/feature_notification.h b/chrome/browser/chromeos/login/quick_unlock/feature_notification.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d34609ad641ecd60ef331ebd07a8b2cfb9ee6f9f |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/login/quick_unlock/feature_notification.h |
| @@ -0,0 +1,48 @@ |
| +// Copyright (c) 2016 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_CHROMEOS_LOGIN_QUICK_UNLOCK_FEATURE_NOTIFICATION_H_ |
| +#define CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_FEATURE_NOTIFICATION_H_ |
| + |
| +#include "base/macros.h" |
| +#include "base/time/time.h" |
| +#include "chrome/browser/notifications/notification.h" |
| +#include "chrome/browser/notifications/notification_delegate.h" |
| + |
| +class Profile; |
| +class NetworkState; |
| + |
| +namespace chromeos { |
| +namespace quickunlock { |
| + |
| +// Quick Unlock feature notification controller is responsible for managing the |
| +// new feature notification displayed to the user. |
| +class FeatureNotificationController : public NotificationDelegate { |
|
jdufault
2016/07/06 21:06:43
What about naming this just QuickUnlockNotificatio
malaykeshav
2016/07/07 21:39:22
This name is slightly misleading since this is a f
jdufault
2016/07/07 22:08:01
QuickUnlockNotificationController then? I think we
malaykeshav
2016/07/07 22:39:42
Done
|
| + public: |
| + explicit FeatureNotificationController(Profile* profile); |
| + |
| + // Returns true if the notification needs to be displayed for the given |
| + // |profile|. |
| + static bool ShouldShowNotificationToProfile(Profile* profile); |
| + |
| + private: |
| + ~FeatureNotificationController() override; |
| + |
| + // NotificationDelegate overrides: |
| + void Close(bool by_user) override; |
| + void Click() override; |
| + std::string id() const override; |
| + |
| + Notification* CreateNotification(); |
| + void UpdatePreferenceForProfile(Profile* profile); |
| + |
| + Profile* profile_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(FeatureNotificationController); |
| +}; |
| + |
| +} // namespace quickunlock |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_LOGIN_QUICK_UNLOCK_FEATURE_NOTIFICATION_H_ |