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

Side by Side Diff: chrome/browser/notifications/screen_lock_notification_blocker.h

Issue 1550593002: Switch to standard integer types in chrome/browser/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « chrome/browser/notifications/profile_notification.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_NOTIFICATIONS_SCREEN_LOCK_NOTIFICATION_BLOCKER_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_SCREEN_LOCK_NOTIFICATION_BLOCKER_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_SCREEN_LOCK_NOTIFICATION_BLOCKER_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_SCREEN_LOCK_NOTIFICATION_BLOCKER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/macros.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
11 #include "ui/message_center/notification_blocker.h" 11 #include "ui/message_center/notification_blocker.h"
12 12
13 // A notification blocker which checks the screen lock state constantly. 13 // A notification blocker which checks the screen lock state constantly.
14 class ScreenLockNotificationBlocker 14 class ScreenLockNotificationBlocker
15 : public message_center::NotificationBlocker { 15 : public message_center::NotificationBlocker {
16 public: 16 public:
17 explicit ScreenLockNotificationBlocker( 17 explicit ScreenLockNotificationBlocker(
18 message_center::MessageCenter* message_center); 18 message_center::MessageCenter* message_center);
19 ~ScreenLockNotificationBlocker() override; 19 ~ScreenLockNotificationBlocker() override;
20 20
21 bool is_locked() const { return is_locked_; } 21 bool is_locked() const { return is_locked_; }
22 22
23 // message_center::NotificationBlocker overrides: 23 // message_center::NotificationBlocker overrides:
24 void CheckState() override; 24 void CheckState() override;
25 bool ShouldShowNotificationAsPopup( 25 bool ShouldShowNotificationAsPopup(
26 const message_center::NotifierId& notifier_id) const override; 26 const message_center::NotifierId& notifier_id) const override;
27 27
28 private: 28 private:
29 bool is_locked_; 29 bool is_locked_;
30 30
31 base::OneShotTimer timer_; 31 base::OneShotTimer timer_;
32 32
33 DISALLOW_COPY_AND_ASSIGN(ScreenLockNotificationBlocker); 33 DISALLOW_COPY_AND_ASSIGN(ScreenLockNotificationBlocker);
34 }; 34 };
35 35
36 #endif // CHROME_BROWSER_NOTIFICATIONS_SCREEN_LOCK_NOTIFICATION_BLOCKER_H_ 36 #endif // CHROME_BROWSER_NOTIFICATIONS_SCREEN_LOCK_NOTIFICATION_BLOCKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/notifications/profile_notification.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698