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

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

Issue 7840001: Change icon for infobar warning about desktop notifications. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
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/content_settings/content_settings_details.h" 10 #include "chrome/browser/content_settings/content_settings_details.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 if (!action_taken_) 115 if (!action_taken_)
116 UMA_HISTOGRAM_COUNTS("NotificationPermissionRequest.Ignored", 1); 116 UMA_HISTOGRAM_COUNTS("NotificationPermissionRequest.Ignored", 1);
117 117
118 RenderViewHost* host = RenderViewHost::FromID(process_id_, route_id_); 118 RenderViewHost* host = RenderViewHost::FromID(process_id_, route_id_);
119 if (host) 119 if (host)
120 host->DesktopNotificationPermissionRequestDone(callback_context_); 120 host->DesktopNotificationPermissionRequestDone(callback_context_);
121 } 121 }
122 122
123 gfx::Image* NotificationPermissionInfoBarDelegate::GetIcon() const { 123 gfx::Image* NotificationPermissionInfoBarDelegate::GetIcon() const {
124 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed( 124 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
125 IDR_PRODUCT_LOGO_32); 125 IDR_DESKTOP_NOTIFICATIONS_PERMISSION);
126 } 126 }
127 127
128 InfoBarDelegate::Type 128 InfoBarDelegate::Type
129 NotificationPermissionInfoBarDelegate::GetInfoBarType() const { 129 NotificationPermissionInfoBarDelegate::GetInfoBarType() const {
130 return PAGE_ACTION_TYPE; 130 return PAGE_ACTION_TYPE;
131 } 131 }
132 132
133 string16 NotificationPermissionInfoBarDelegate::GetMessageText() const { 133 string16 NotificationPermissionInfoBarDelegate::GetMessageText() const {
134 return l10n_util::GetStringFUTF16(IDS_NOTIFICATION_PERMISSIONS, 134 return l10n_util::GetStringFUTF16(IDS_NOTIFICATION_PERMISSIONS,
135 display_name_); 135 display_name_);
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 431
432 if (setting == CONTENT_SETTING_ALLOW) 432 if (setting == CONTENT_SETTING_ALLOW)
433 return WebKit::WebNotificationPresenter::PermissionAllowed; 433 return WebKit::WebNotificationPresenter::PermissionAllowed;
434 if (setting == CONTENT_SETTING_BLOCK) 434 if (setting == CONTENT_SETTING_BLOCK)
435 return WebKit::WebNotificationPresenter::PermissionDenied; 435 return WebKit::WebNotificationPresenter::PermissionDenied;
436 if (setting == CONTENT_SETTING_ASK) 436 if (setting == CONTENT_SETTING_ASK)
437 return WebKit::WebNotificationPresenter::PermissionNotAllowed; 437 return WebKit::WebNotificationPresenter::PermissionNotAllowed;
438 NOTREACHED() << "Invalid notifications settings value: " << setting; 438 NOTREACHED() << "Invalid notifications settings value: " << setting;
439 return WebKit::WebNotificationPresenter::PermissionNotAllowed; 439 return WebKit::WebNotificationPresenter::PermissionNotAllowed;
440 } 440 }
OLDNEW
« chrome/app/theme/theme_resources.grd ('K') | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698