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

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

Issue 2198363002: Pass Notification into NotificationBlocker ShouldShow* methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ash build errors Created 4 years, 4 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
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 #include "chrome/browser/notifications/screen_lock_notification_blocker.h" 5 #include "chrome/browser/notifications/screen_lock_notification_blocker.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "ui/base/idle/idle.h" 8 #include "ui/base/idle/idle.h"
9 9
10 namespace { 10 namespace {
(...skipping 17 matching lines...) Expand all
28 28
29 if (is_locked_) { 29 if (is_locked_) {
30 timer_.Start(FROM_HERE, 30 timer_.Start(FROM_HERE,
31 base::TimeDelta::FromSeconds(kUserStatePollingIntervalSeconds), 31 base::TimeDelta::FromSeconds(kUserStatePollingIntervalSeconds),
32 this, 32 this,
33 &ScreenLockNotificationBlocker::CheckState); 33 &ScreenLockNotificationBlocker::CheckState);
34 } 34 }
35 } 35 }
36 36
37 bool ScreenLockNotificationBlocker::ShouldShowNotificationAsPopup( 37 bool ScreenLockNotificationBlocker::ShouldShowNotificationAsPopup(
38 const message_center::NotifierId& notifier_id) const { 38 const message_center::Notification& notification) const {
39 return !is_locked_; 39 return !is_locked_;
40 } 40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698