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

Side by Side Diff: chrome/browser/ui/views/ash/balloon_view_ash.cc

Issue 10824359: Remove ImageSkia::empty and ImageSkia::extractSubset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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) 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/ui/views/ash/balloon_view_ash.h" 5 #include "chrome/browser/ui/views/ash/balloon_view_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/status_area_widget.h" 8 #include "ash/system/status_area_widget.h"
9 #include "ash/system/web_notification/web_notification_tray.h" 9 #include "ash/system/web_notification/web_notification_tray.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 gfx::Size BalloonViewAsh::GetSize() const { 127 gfx::Size BalloonViewAsh::GetSize() const {
128 return gfx::Size(); 128 return gfx::Size();
129 } 129 }
130 130
131 BalloonHost* BalloonViewAsh::GetHost() const { 131 BalloonHost* BalloonViewAsh::GetHost() const {
132 return NULL; 132 return NULL;
133 } 133 }
134 134
135 void BalloonViewAsh::FetchIcon(const Notification& notification) { 135 void BalloonViewAsh::FetchIcon(const Notification& notification) {
136 if (!notification.icon().empty()) { 136 if (!notification.icon().isNull()) {
137 ash::Shell::GetInstance()->status_area_widget()-> 137 ash::Shell::GetInstance()->status_area_widget()->
138 web_notification_tray()->SetNotificationImage( 138 web_notification_tray()->SetNotificationImage(
139 notification.notification_id(), notification.icon()); 139 notification.notification_id(), notification.icon());
140 return; 140 return;
141 } 141 }
142 if (notification.icon_url().is_empty()) 142 if (notification.icon_url().is_empty())
143 return; 143 return;
144 content::RenderViewHost* rvh = notification.GetRenderViewHost(); 144 content::RenderViewHost* rvh = notification.GetRenderViewHost();
145 if (!rvh) { 145 if (!rvh) {
146 LOG(WARNING) << "Notification has icon url but no RenderViewHost"; 146 LOG(WARNING) << "Notification has icon url but no RenderViewHost";
(...skipping 14 matching lines...) Expand all
161 ExtensionService* extension_service = 161 ExtensionService* extension_service =
162 balloon_->profile()->GetExtensionService(); 162 balloon_->profile()->GetExtensionService();
163 const GURL& origin = balloon_->notification().origin_url(); 163 const GURL& origin = balloon_->notification().origin_url();
164 const extensions::Extension* extension = 164 const extensions::Extension* extension =
165 extension_service->extensions()->GetExtensionOrAppByURL( 165 extension_service->extensions()->GetExtensionOrAppByURL(
166 ExtensionURLInfo(origin)); 166 ExtensionURLInfo(origin));
167 if (extension) 167 if (extension)
168 return extension->id(); 168 return extension->id();
169 return std::string(); 169 return std::string();
170 } 170 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/browser_launcher_item_controller.cc ('k') | chrome/browser/ui/views/web_intent_picker_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698