OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/non_persistent_notification_handler.h" | 5 #include "chrome/browser/notifications/non_persistent_notification_handler.h" |
6 | 6 |
7 #include "base/strings/nullable_string16.h" | 7 #include "base/strings/nullable_string16.h" |
8 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 8 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
9 #include "content/public/browser/notification_event_dispatcher.h" | 9 #include "content/public/browser/notification_event_dispatcher.h" |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 // https://notifications.spec.whatwg.org/#create-a-notification | 39 // https://notifications.spec.whatwg.org/#create-a-notification |
40 DCHECK_EQ(-1, action_index); | 40 DCHECK_EQ(-1, action_index); |
41 | 41 |
42 content::NotificationEventDispatcher::GetInstance() | 42 content::NotificationEventDispatcher::GetInstance() |
43 ->DispatchNonPersistentClickEvent(notification_id); | 43 ->DispatchNonPersistentClickEvent(notification_id); |
44 } | 44 } |
45 | 45 |
46 void NonPersistentNotificationHandler::OpenSettings(Profile* profile) { | 46 void NonPersistentNotificationHandler::OpenSettings(Profile* profile) { |
47 NotificationCommon::OpenNotificationSettings(profile); | 47 NotificationCommon::OpenNotificationSettings(profile); |
48 } | 48 } |
| 49 |
| 50 bool NonPersistentNotificationHandler::ShouldDisplayOnFullScreen( |
| 51 Profile* profile, |
| 52 const std::string& origin) const { |
| 53 return NotificationCommon::ActiveTabIsFullScreen(profile, GURL(origin)); |
| 54 } |
OLD | NEW |