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

Unified Diff: chrome/browser/chrome_webusb_browser_client.cc

Issue 1407233014: Add image assets for WebUSB notification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix theme_resources.h path. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_webusb_browser_client.cc
diff --git a/chrome/browser/chrome_webusb_browser_client.cc b/chrome/browser/chrome_webusb_browser_client.cc
index ddfcd58916583b8f203629377e5c9369fc7e833f..4f55d1d634d68c03c65a0bc409b9fc5d88df9a87 100644
--- a/chrome/browser/chrome_webusb_browser_client.cc
+++ b/chrome/browser/chrome_webusb_browser_client.cc
@@ -11,9 +11,11 @@
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
#include "chrome/grit/generated_resources.h"
+#include "chrome/grit/theme_resources.h"
#include "content/public/common/origin_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/page_transition_types.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/base/window_open_disposition.h"
#include "ui/gfx/image/image.h"
#include "ui/message_center/message_center.h"
@@ -74,6 +76,7 @@ void ChromeWebUsbBrowserClient::OnDeviceAdded(
return;
}
+ ResourceBundle& rb = ResourceBundle::GetSharedInstance();
message_center::RichNotificationData rich_notification_data;
scoped_ptr<message_center::Notification> notification(
new message_center::Notification(
@@ -83,8 +86,8 @@ void ChromeWebUsbBrowserClient::OnDeviceAdded(
l10n_util::GetStringFUTF16(
IDS_WEBUSB_DEVICE_DETECTED_NOTIFICATION,
base::UTF8ToUTF16(landing_page.GetContent())),
- // TODO(juncai): use generic USB device icon here.
- gfx::Image(), base::string16(), GURL(),
+ rb.GetNativeImageNamed(IDR_USB_NOTIFICATION_ICON),
+ base::string16(), GURL(),
message_center::NotifierId(
message_center::NotifierId::SYSTEM_COMPONENT,
kWebUsbDetectorNotificationID),
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698