OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/desktop_notification_service.h" | 5 #include "chrome/browser/notifications/desktop_notification_service.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/threading/thread.h" | 8 #include "base/threading/thread.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 21 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" | 23 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
24 #include "chrome/browser/ui/browser_list.h" | 24 #include "chrome/browser/ui/browser_list.h" |
25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 25 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
26 #include "chrome/common/chrome_notification_types.h" | 26 #include "chrome/common/chrome_notification_types.h" |
27 #include "chrome/common/content_settings.h" | 27 #include "chrome/common/content_settings.h" |
28 #include "chrome/common/content_settings_pattern.h" | 28 #include "chrome/common/content_settings_pattern.h" |
29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
30 #include "chrome/common/url_constants.h" | 30 #include "chrome/common/url_constants.h" |
31 #include "content/browser/browser_child_process_host.h" | |
32 #include "content/browser/renderer_host/render_view_host.h" | 31 #include "content/browser/renderer_host/render_view_host.h" |
33 #include "content/browser/site_instance.h" | 32 #include "content/browser/site_instance.h" |
34 #include "content/browser/worker_host/worker_process_host.h" | 33 #include "content/browser/worker_host/worker_process_host.h" |
35 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
36 #include "content/public/browser/notification_service.h" | 35 #include "content/public/browser/notification_service.h" |
37 #include "content/public/browser/web_contents.h" | 36 #include "content/public/browser/web_contents.h" |
38 #include "content/public/common/show_desktop_notification_params.h" | 37 #include "content/public/common/show_desktop_notification_params.h" |
39 #include "grit/browser_resources.h" | 38 #include "grit/browser_resources.h" |
40 #include "grit/chromium_strings.h" | 39 #include "grit/chromium_strings.h" |
41 #include "grit/generated_resources.h" | 40 #include "grit/generated_resources.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 | 452 |
454 if (setting == CONTENT_SETTING_ALLOW) | 453 if (setting == CONTENT_SETTING_ALLOW) |
455 return WebKit::WebNotificationPresenter::PermissionAllowed; | 454 return WebKit::WebNotificationPresenter::PermissionAllowed; |
456 if (setting == CONTENT_SETTING_BLOCK) | 455 if (setting == CONTENT_SETTING_BLOCK) |
457 return WebKit::WebNotificationPresenter::PermissionDenied; | 456 return WebKit::WebNotificationPresenter::PermissionDenied; |
458 if (setting == CONTENT_SETTING_ASK) | 457 if (setting == CONTENT_SETTING_ASK) |
459 return WebKit::WebNotificationPresenter::PermissionNotAllowed; | 458 return WebKit::WebNotificationPresenter::PermissionNotAllowed; |
460 NOTREACHED() << "Invalid notifications settings value: " << setting; | 459 NOTREACHED() << "Invalid notifications settings value: " << setting; |
461 return WebKit::WebNotificationPresenter::PermissionNotAllowed; | 460 return WebKit::WebNotificationPresenter::PermissionNotAllowed; |
462 } | 461 } |
OLD | NEW |