OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/notification_permission_context.h" | 5 #include "chrome/browser/notifications/notification_permission_context.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/rand_util.h" | 12 #include "base/rand_util.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
16 #include "chrome/browser/notifications/desktop_notification_profile_util.h" | 16 #include "chrome/browser/notifications/desktop_notification_profile_util.h" |
17 #include "chrome/browser/permissions/permission_request_id.h" | 17 #include "chrome/browser/permissions/permission_request_id.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "components/content_settings/core/common/content_settings_pattern.h" | 19 #include "components/content_settings/core/common/content_settings_pattern.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/permission_type.h" | 21 #include "content/public/browser/permission_type.h" |
22 #include "content/public/browser/render_frame_host.h" | 22 #include "content/public/browser/render_frame_host.h" |
23 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
24 #include "content/public/browser/web_contents_user_data.h" | 24 #include "content/public/browser/web_contents_user_data.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 requesting_origin); | 234 requesting_origin); |
235 } else { | 235 } else { |
236 DesktopNotificationProfileUtil::DenyPermission(profile(), | 236 DesktopNotificationProfileUtil::DenyPermission(profile(), |
237 requesting_origin); | 237 requesting_origin); |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 bool NotificationPermissionContext::IsRestrictedToSecureOrigins() const { | 241 bool NotificationPermissionContext::IsRestrictedToSecureOrigins() const { |
242 return false; | 242 return false; |
243 } | 243 } |
OLD | NEW |