summaryrefslogtreecommitdiffstats
path: root/chrome/browser/status_icons
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/status_icons')
-rw-r--r--chrome/browser/status_icons/desktop_notification_balloon.cc4
-rw-r--r--chrome/browser/status_icons/desktop_notification_balloon.h7
-rw-r--r--chrome/browser/status_icons/status_icon.h10
-rw-r--r--chrome/browser/status_icons/status_icon_unittest.cc6
-rw-r--r--chrome/browser/status_icons/status_tray_unittest.cc6
5 files changed, 19 insertions, 14 deletions
diff --git a/chrome/browser/status_icons/desktop_notification_balloon.cc b/chrome/browser/status_icons/desktop_notification_balloon.cc
index 8619c9a..0b1501b 100644
--- a/chrome/browser/status_icons/desktop_notification_balloon.cc
+++ b/chrome/browser/status_icons/desktop_notification_balloon.cc
@@ -71,7 +71,7 @@ DesktopNotificationBalloon::~DesktopNotificationBalloon() {
CloseBalloon(notification_id_);
}
-void DesktopNotificationBalloon::DisplayBalloon(const SkBitmap& icon,
+void DesktopNotificationBalloon::DisplayBalloon(const gfx::ImageSkia& icon,
const string16& title,
const string16& contents) {
// Allowing IO access is required here to cover the corner case where
@@ -83,6 +83,6 @@ void DesktopNotificationBalloon::DisplayBalloon(const SkBitmap& icon,
profile = ProfileManager::GetLastUsedProfile();
}
notification_id_ = DesktopNotificationService::AddIconNotification(
- GURL(), title, contents, gfx::ImageSkia(icon), string16(),
+ GURL(), title, contents, icon, string16(),
new DummyNotificationDelegate(base::IntToString(id_count_++)), profile);
}
diff --git a/chrome/browser/status_icons/desktop_notification_balloon.h b/chrome/browser/status_icons/desktop_notification_balloon.h
index 475857e3..7ce9712 100644
--- a/chrome/browser/status_icons/desktop_notification_balloon.h
+++ b/chrome/browser/status_icons/desktop_notification_balloon.h
@@ -10,7 +10,10 @@
#include "base/string16.h"
class Notification;
-class SkBitmap;
+
+namespace gfx {
+class ImageSkia;
+}
// Provides the notification balloon functionality by using desktop
// notifications to platforms that don't have a specific native API.
@@ -19,7 +22,7 @@ class DesktopNotificationBalloon {
DesktopNotificationBalloon();
virtual ~DesktopNotificationBalloon();
- void DisplayBalloon(const SkBitmap& icon,
+ void DisplayBalloon(const gfx::ImageSkia& icon,
const string16& title,
const string16& contents);
diff --git a/chrome/browser/status_icons/status_icon.h b/chrome/browser/status_icons/status_icon.h
index 6463f94..9cd02d7 100644
--- a/chrome/browser/status_icons/status_icon.h
+++ b/chrome/browser/status_icons/status_icon.h
@@ -10,7 +10,9 @@
#include "base/observer_list.h"
#include "base/string16.h"
-class SkBitmap;
+namespace gfx {
+class ImageSkia;
+}
namespace ui {
class MenuModel;
@@ -24,17 +26,17 @@ class StatusIcon {
virtual ~StatusIcon();
// Sets the image associated with this status icon.
- virtual void SetImage(const SkBitmap& image) = 0;
+ virtual void SetImage(const gfx::ImageSkia& image) = 0;
// Sets the image associated with this status icon when pressed.
- virtual void SetPressedImage(const SkBitmap& image) = 0;
+ virtual void SetPressedImage(const gfx::ImageSkia& image) = 0;
// Sets the hover text for this status icon.
virtual void SetToolTip(const string16& tool_tip) = 0;
// Displays a notification balloon with the specified contents.
// Depending on the platform it might not appear by the icon tray.
- virtual void DisplayBalloon(const SkBitmap& icon,
+ virtual void DisplayBalloon(const gfx::ImageSkia& icon,
const string16& title,
const string16& contents) = 0;
diff --git a/chrome/browser/status_icons/status_icon_unittest.cc b/chrome/browser/status_icons/status_icon_unittest.cc
index 8bb038a..8078665 100644
--- a/chrome/browser/status_icons/status_icon_unittest.cc
+++ b/chrome/browser/status_icons/status_icon_unittest.cc
@@ -18,11 +18,11 @@ class MockStatusIconObserver : public StatusIconObserver {
class TestStatusIcon : public StatusIcon {
public:
TestStatusIcon() {}
- virtual void SetImage(const SkBitmap& image) OVERRIDE {}
- virtual void SetPressedImage(const SkBitmap& image) OVERRIDE {}
+ virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {}
+ virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE {}
virtual void SetToolTip(const string16& tool_tip) OVERRIDE {}
virtual void UpdatePlatformContextMenu(ui::MenuModel* menu) OVERRIDE {}
- virtual void DisplayBalloon(const SkBitmap& icon,
+ virtual void DisplayBalloon(const gfx::ImageSkia& icon,
const string16& title,
const string16& contents) OVERRIDE {}
};
diff --git a/chrome/browser/status_icons/status_tray_unittest.cc b/chrome/browser/status_icons/status_tray_unittest.cc
index 3983dbe..51d38b4 100644
--- a/chrome/browser/status_icons/status_tray_unittest.cc
+++ b/chrome/browser/status_icons/status_tray_unittest.cc
@@ -13,10 +13,10 @@
using testing::Return;
class MockStatusIcon : public StatusIcon {
- virtual void SetImage(const SkBitmap& image) OVERRIDE {}
- virtual void SetPressedImage(const SkBitmap& image) OVERRIDE {}
+ virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {}
+ virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE {}
virtual void SetToolTip(const string16& tool_tip) OVERRIDE {}
- virtual void DisplayBalloon(const SkBitmap& icon,
+ virtual void DisplayBalloon(const gfx::ImageSkia& icon,
const string16& title,
const string16& contents) OVERRIDE {}
virtual void UpdatePlatformContextMenu(ui::MenuModel* menu) OVERRIDE {}