OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 19 matching lines...) Expand all Loading... |
30 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
31 #include "chrome/common/url_constants.h" | 31 #include "chrome/common/url_constants.h" |
32 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" |
33 #include "content/public/browser/notification_service.h" | 33 #include "content/public/browser/notification_service.h" |
34 #include "content/public/browser/render_view_host.h" | 34 #include "content/public/browser/render_view_host.h" |
35 #include "content/public/browser/web_contents.h" | 35 #include "content/public/browser/web_contents.h" |
36 #include "content/public/common/show_desktop_notification_params.h" | 36 #include "content/public/common/show_desktop_notification_params.h" |
37 #include "grit/browser_resources.h" | 37 #include "grit/browser_resources.h" |
38 #include "grit/chromium_strings.h" | 38 #include "grit/chromium_strings.h" |
39 #include "grit/generated_resources.h" | 39 #include "grit/generated_resources.h" |
40 #include "grit/theme_resources_standard.h" | 40 #include "grit/theme_resources.h" |
41 #include "net/base/escape.h" | 41 #include "net/base/escape.h" |
42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
43 #include "ui/base/l10n/l10n_util.h" | 43 #include "ui/base/l10n/l10n_util.h" |
44 #include "ui/base/layout.h" | 44 #include "ui/base/layout.h" |
45 #include "ui/base/resource/resource_bundle.h" | 45 #include "ui/base/resource/resource_bundle.h" |
46 | 46 |
47 #if defined(USE_ASH) | 47 #if defined(USE_ASH) |
48 #include "ash/ash_switches.h" | 48 #include "ash/ash_switches.h" |
49 #include "base/command_line.h" | 49 #include "base/command_line.h" |
50 | 50 |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 | 518 |
519 if (setting == CONTENT_SETTING_ALLOW) | 519 if (setting == CONTENT_SETTING_ALLOW) |
520 return WebKit::WebNotificationPresenter::PermissionAllowed; | 520 return WebKit::WebNotificationPresenter::PermissionAllowed; |
521 if (setting == CONTENT_SETTING_BLOCK) | 521 if (setting == CONTENT_SETTING_BLOCK) |
522 return WebKit::WebNotificationPresenter::PermissionDenied; | 522 return WebKit::WebNotificationPresenter::PermissionDenied; |
523 if (setting == CONTENT_SETTING_ASK) | 523 if (setting == CONTENT_SETTING_ASK) |
524 return WebKit::WebNotificationPresenter::PermissionNotAllowed; | 524 return WebKit::WebNotificationPresenter::PermissionNotAllowed; |
525 NOTREACHED() << "Invalid notifications settings value: " << setting; | 525 NOTREACHED() << "Invalid notifications settings value: " << setting; |
526 return WebKit::WebNotificationPresenter::PermissionNotAllowed; | 526 return WebKit::WebNotificationPresenter::PermissionNotAllowed; |
527 } | 527 } |
OLD | NEW |