Commit 72d3e5c0 authored by jitendra.ks's avatar jitendra.ks Committed by Commit bot

Remove IDR_STATUS_TRAY_ICON_PRESSED

IDR_STATUS_TRAY_ICON_PRESSED is only used in unit testcases. So we remove
this so that it should not endup in pak files.

BUG=367339

Review URL: https://codereview.chromium.org/464163003

Cr-Commit-Position: refs/heads/master@{#294324}
parent 51ffb80c
...@@ -22,11 +22,9 @@ ...@@ -22,11 +22,9 @@
what you're doing! --> what you're doing! -->
<if expr="is_macosx"> <if expr="is_macosx">
<include name="IDR_STATUS_TRAY_ICON" file="google_chrome/product_logo_22_mono.png" type="BINDATA" /> <include name="IDR_STATUS_TRAY_ICON" file="google_chrome/product_logo_22_mono.png" type="BINDATA" />
<include name="IDR_STATUS_TRAY_ICON_PRESSED" file="google_chrome/product_logo_22_mono_invert.png" type="BINDATA" />
</if> </if>
<if expr="not is_macosx"> <if expr="not is_macosx">
<include name="IDR_STATUS_TRAY_ICON" file="google_chrome/product_logo_22.png" type="BINDATA" /> <include name="IDR_STATUS_TRAY_ICON" file="google_chrome/product_logo_22.png" type="BINDATA" />
<include name="IDR_STATUS_TRAY_ICON_PRESSED" file="google_chrome/product_logo_22.png" type="BINDATA" />
</if> </if>
</if> </if>
<if expr="not _google_chrome"> <if expr="not _google_chrome">
...@@ -37,11 +35,9 @@ ...@@ -37,11 +35,9 @@
what you're doing! --> what you're doing! -->
<if expr="is_macosx"> <if expr="is_macosx">
<include name="IDR_STATUS_TRAY_ICON" file="chromium/product_logo_22_mono.png" type="BINDATA" /> <include name="IDR_STATUS_TRAY_ICON" file="chromium/product_logo_22_mono.png" type="BINDATA" />
<include name="IDR_STATUS_TRAY_ICON_PRESSED" file="chromium/product_logo_22_mono_invert.png" type="BINDATA" />
</if> </if>
<if expr="not is_macosx"> <if expr="not is_macosx">
<include name="IDR_STATUS_TRAY_ICON" file="chromium/product_logo_22.png" type="BINDATA" /> <include name="IDR_STATUS_TRAY_ICON" file="chromium/product_logo_22.png" type="BINDATA" />
<include name="IDR_STATUS_TRAY_ICON_PRESSED" file="chromium/product_logo_22.png" type="BINDATA" />
</if> </if>
</if> </if>
<if expr="is_win"> <if expr="is_win">
......
...@@ -76,7 +76,6 @@ class TestStatusIcon : public StatusIcon { ...@@ -76,7 +76,6 @@ class TestStatusIcon : public StatusIcon {
public: public:
TestStatusIcon() {} TestStatusIcon() {}
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {} virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {}
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE {}
virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE {} virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE {}
virtual void DisplayBalloon(const gfx::ImageSkia& icon, virtual void DisplayBalloon(const gfx::ImageSkia& icon,
const base::string16& title, const base::string16& title,
......
...@@ -25,9 +25,6 @@ class StatusIcon { ...@@ -25,9 +25,6 @@ class StatusIcon {
// Sets the image associated with this status icon. // Sets the image associated with this status icon.
virtual void SetImage(const gfx::ImageSkia& image) = 0; virtual void SetImage(const gfx::ImageSkia& image) = 0;
// Sets the image associated with this status icon when pressed.
virtual void SetPressedImage(const gfx::ImageSkia& image) = 0;
// Sets the hover text for this status icon. This is also used as the label // Sets the hover text for this status icon. This is also used as the label
// for the menu item which is created as a replacement for the status icon // for the menu item which is created as a replacement for the status icon
// click action on platforms that do not support custom click actions for the // click action on platforms that do not support custom click actions for the
......
...@@ -76,7 +76,6 @@ TEST_F(StatusIconMenuModelTest, SetProperties) { ...@@ -76,7 +76,6 @@ TEST_F(StatusIconMenuModelTest, SetProperties) {
ui::Accelerator test_accel(ui::VKEY_A, ui::EF_NONE); ui::Accelerator test_accel(ui::VKEY_A, ui::EF_NONE);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
gfx::Image test_image1(*rb.GetImageSkiaNamed(IDR_STATUS_TRAY_ICON)); gfx::Image test_image1(*rb.GetImageSkiaNamed(IDR_STATUS_TRAY_ICON));
gfx::Image test_image2(*rb.GetImageSkiaNamed(IDR_STATUS_TRAY_ICON_PRESSED));
ui::Accelerator accel_arg; ui::Accelerator accel_arg;
gfx::Image image_arg; gfx::Image image_arg;
...@@ -105,9 +104,6 @@ TEST_F(StatusIconMenuModelTest, SetProperties) { ...@@ -105,9 +104,6 @@ TEST_F(StatusIconMenuModelTest, SetProperties) {
menu_model()->ChangeIconForCommandId(1, test_image1); menu_model()->ChangeIconForCommandId(1, test_image1);
EXPECT_TRUE(menu_model()->GetIconForCommandId(1, &image_arg)); EXPECT_TRUE(menu_model()->GetIconForCommandId(1, &image_arg));
EXPECT_EQ(image_arg.ToImageSkia(), test_image1.ToImageSkia()); EXPECT_EQ(image_arg.ToImageSkia(), test_image1.ToImageSkia());
menu_model()->ChangeIconForCommandId(1, test_image2);
EXPECT_TRUE(menu_model()->GetIconForCommandId(1, &image_arg));
EXPECT_EQ(image_arg.ToImageSkia(), test_image2.ToImageSkia());
// Ensure changes to one menu item does not affect the other menu item. // Ensure changes to one menu item does not affect the other menu item.
EXPECT_FALSE(menu_model()->GetAcceleratorForCommandId(1, &accel_arg)); EXPECT_FALSE(menu_model()->GetAcceleratorForCommandId(1, &accel_arg));
...@@ -115,6 +111,6 @@ TEST_F(StatusIconMenuModelTest, SetProperties) { ...@@ -115,6 +111,6 @@ TEST_F(StatusIconMenuModelTest, SetProperties) {
EXPECT_EQ(base::string16(), menu_model()->GetSublabelForCommandId(0)); EXPECT_EQ(base::string16(), menu_model()->GetSublabelForCommandId(0));
EXPECT_FALSE(menu_model()->GetIconForCommandId(0, &image_arg)); EXPECT_FALSE(menu_model()->GetIconForCommandId(0, &image_arg));
// Menu state should have changed 8 times in this test. // Menu state should have changed 7 times in this test.
EXPECT_EQ(8, changed_count()); EXPECT_EQ(7, changed_count());
} }
...@@ -19,7 +19,6 @@ class TestStatusIcon : public StatusIcon { ...@@ -19,7 +19,6 @@ class TestStatusIcon : public StatusIcon {
public: public:
TestStatusIcon() {} TestStatusIcon() {}
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {} virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {}
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE {}
virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE {} virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE {}
virtual void UpdatePlatformContextMenu( virtual void UpdatePlatformContextMenu(
StatusIconMenuModel* menu) OVERRIDE {} StatusIconMenuModel* menu) OVERRIDE {}
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
class MockStatusIcon : public StatusIcon { class MockStatusIcon : public StatusIcon {
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {} virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE {}
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE {}
virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE {} virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE {}
virtual void DisplayBalloon(const gfx::ImageSkia& icon, virtual void DisplayBalloon(const gfx::ImageSkia& icon,
const base::string16& title, const base::string16& title,
......
...@@ -25,7 +25,6 @@ class StatusIconMac : public StatusIcon { ...@@ -25,7 +25,6 @@ class StatusIconMac : public StatusIcon {
// Overridden from StatusIcon. // Overridden from StatusIcon.
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE; virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE; virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE;
virtual void DisplayBalloon(const gfx::ImageSkia& icon, virtual void DisplayBalloon(const gfx::ImageSkia& icon,
const base::string16& title, const base::string16& title,
......
...@@ -71,14 +71,6 @@ void StatusIconMac::SetImage(const gfx::ImageSkia& image) { ...@@ -71,14 +71,6 @@ void StatusIconMac::SetImage(const gfx::ImageSkia& image) {
} }
} }
void StatusIconMac::SetPressedImage(const gfx::ImageSkia& image) {
if (!image.isNull()) {
NSImage* ns_image = gfx::SkBitmapToNSImage(*image.bitmap());
if (ns_image)
[item() setAlternateImage:ns_image];
}
}
void StatusIconMac::SetToolTip(const base::string16& tool_tip) { void StatusIconMac::SetToolTip(const base::string16& tool_tip) {
// If we have a status icon menu, make the tool tip part of the menu instead // If we have a status icon menu, make the tool tip part of the menu instead
// of a pop-up tool tip when hovering the mouse over the image. // of a pop-up tool tip when hovering the mouse over the image.
......
...@@ -24,8 +24,6 @@ TEST_F(StatusIconMacTest, Create) { ...@@ -24,8 +24,6 @@ TEST_F(StatusIconMacTest, Create) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
gfx::ImageSkia* image = rb.GetImageSkiaNamed(IDR_STATUS_TRAY_ICON); gfx::ImageSkia* image = rb.GetImageSkiaNamed(IDR_STATUS_TRAY_ICON);
icon->SetImage(*image); icon->SetImage(*image);
gfx::ImageSkia* pressed = rb.GetImageSkiaNamed(IDR_STATUS_TRAY_ICON_PRESSED);
icon->SetPressedImage(*pressed);
icon->SetToolTip(base::ASCIIToUTF16("tool tip")); icon->SetToolTip(base::ASCIIToUTF16("tool tip"));
} }
......
...@@ -289,11 +289,6 @@ void AppIndicatorIcon::SetImage(const gfx::ImageSkia& image) { ...@@ -289,11 +289,6 @@ void AppIndicatorIcon::SetImage(const gfx::ImageSkia& image) {
weak_factory_.GetWeakPtr())); weak_factory_.GetWeakPtr()));
} }
void AppIndicatorIcon::SetPressedImage(const gfx::ImageSkia& image) {
// Ignore pressed images, since the standard on Linux is to not highlight
// pressed status icons.
}
void AppIndicatorIcon::SetToolTip(const base::string16& tool_tip) { void AppIndicatorIcon::SetToolTip(const base::string16& tool_tip) {
DCHECK(!tool_tip_.empty()); DCHECK(!tool_tip_.empty());
tool_tip_ = base::UTF16ToUTF8(tool_tip); tool_tip_ = base::UTF16ToUTF8(tool_tip);
......
...@@ -40,7 +40,6 @@ class AppIndicatorIcon : public views::StatusIconLinux { ...@@ -40,7 +40,6 @@ class AppIndicatorIcon : public views::StatusIconLinux {
// Overridden from views::StatusIconLinux: // Overridden from views::StatusIconLinux:
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE; virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE; virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE;
virtual void UpdatePlatformContextMenu(ui::MenuModel* menu) OVERRIDE; virtual void UpdatePlatformContextMenu(ui::MenuModel* menu) OVERRIDE;
virtual void RefreshPlatformContextMenu() OVERRIDE; virtual void RefreshPlatformContextMenu() OVERRIDE;
......
...@@ -37,11 +37,6 @@ void Gtk2StatusIcon::SetImage(const gfx::ImageSkia& image) { ...@@ -37,11 +37,6 @@ void Gtk2StatusIcon::SetImage(const gfx::ImageSkia& image) {
g_object_unref(pixbuf); g_object_unref(pixbuf);
} }
void Gtk2StatusIcon::SetPressedImage(const gfx::ImageSkia& image) {
// Ignore pressed images, since the standard on Linux is to not highlight
// pressed status icons.
}
void Gtk2StatusIcon::SetToolTip(const base::string16& tool_tip) { void Gtk2StatusIcon::SetToolTip(const base::string16& tool_tip) {
gtk_status_icon_set_tooltip_text(gtk_status_icon_, gtk_status_icon_set_tooltip_text(gtk_status_icon_,
base::UTF16ToUTF8(tool_tip).c_str()); base::UTF16ToUTF8(tool_tip).c_str());
......
...@@ -34,7 +34,6 @@ class Gtk2StatusIcon : public views::StatusIconLinux { ...@@ -34,7 +34,6 @@ class Gtk2StatusIcon : public views::StatusIconLinux {
// Overridden from views::StatusIconLinux: // Overridden from views::StatusIconLinux:
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE; virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE; virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE;
virtual void UpdatePlatformContextMenu(ui::MenuModel* menu) OVERRIDE; virtual void UpdatePlatformContextMenu(ui::MenuModel* menu) OVERRIDE;
virtual void RefreshPlatformContextMenu() OVERRIDE; virtual void RefreshPlatformContextMenu() OVERRIDE;
......
...@@ -22,10 +22,6 @@ void StatusIconLinuxWrapper::SetImage(const gfx::ImageSkia& image) { ...@@ -22,10 +22,6 @@ void StatusIconLinuxWrapper::SetImage(const gfx::ImageSkia& image) {
status_icon_->SetImage(image); status_icon_->SetImage(image);
} }
void StatusIconLinuxWrapper::SetPressedImage(const gfx::ImageSkia& image) {
status_icon_->SetPressedImage(image);
}
void StatusIconLinuxWrapper::SetToolTip(const base::string16& tool_tip) { void StatusIconLinuxWrapper::SetToolTip(const base::string16& tool_tip) {
status_icon_->SetToolTip(tool_tip); status_icon_->SetToolTip(tool_tip);
} }
......
...@@ -20,7 +20,6 @@ class StatusIconLinuxWrapper : public StatusIcon, ...@@ -20,7 +20,6 @@ class StatusIconLinuxWrapper : public StatusIcon,
// StatusIcon overrides: // StatusIcon overrides:
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE; virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE; virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE;
virtual void DisplayBalloon(const gfx::ImageSkia& icon, virtual void DisplayBalloon(const gfx::ImageSkia& icon,
const base::string16& title, const base::string16& title,
......
...@@ -104,11 +104,6 @@ void StatusIconWin::SetImage(const gfx::ImageSkia& image) { ...@@ -104,11 +104,6 @@ void StatusIconWin::SetImage(const gfx::ImageSkia& image) {
LOG(WARNING) << "Error setting status tray icon image"; LOG(WARNING) << "Error setting status tray icon image";
} }
void StatusIconWin::SetPressedImage(const gfx::ImageSkia& image) {
// Ignore pressed images, since the standard on Windows is to not highlight
// pressed status icons.
}
void StatusIconWin::SetToolTip(const base::string16& tool_tip) { void StatusIconWin::SetToolTip(const base::string16& tool_tip) {
// Create the icon. // Create the icon.
NOTIFYICONDATA icon_data; NOTIFYICONDATA icon_data;
......
...@@ -47,7 +47,6 @@ class StatusIconWin : public StatusIcon { ...@@ -47,7 +47,6 @@ class StatusIconWin : public StatusIcon {
// Overridden from StatusIcon: // Overridden from StatusIcon:
virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE; virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE;
virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE; virtual void SetToolTip(const base::string16& tool_tip) OVERRIDE;
virtual void DisplayBalloon(const gfx::ImageSkia& icon, virtual void DisplayBalloon(const gfx::ImageSkia& icon,
const base::string16& title, const base::string16& title,
......
...@@ -71,7 +71,6 @@ TEST(StatusTrayWinTest, CreateIconAndMenu) { ...@@ -71,7 +71,6 @@ TEST(StatusTrayWinTest, CreateIconAndMenu) {
gfx::ImageSkia* image = rb.GetImageSkiaNamed(IDR_STATUS_TRAY_ICON); gfx::ImageSkia* image = rb.GetImageSkiaNamed(IDR_STATUS_TRAY_ICON);
StatusIcon* icon = tray.CreateStatusIcon( StatusIcon* icon = tray.CreateStatusIcon(
StatusTray::OTHER_ICON, *image, base::ASCIIToUTF16("tool tip")); StatusTray::OTHER_ICON, *image, base::ASCIIToUTF16("tool tip"));
icon->SetPressedImage(*image);
scoped_ptr<StatusIconMenuModel> menu(new StatusIconMenuModel(NULL)); scoped_ptr<StatusIconMenuModel> menu(new StatusIconMenuModel(NULL));
menu->AddItem(0, L"foo"); menu->AddItem(0, L"foo");
icon->SetContextMenu(menu.Pass()); icon->SetContextMenu(menu.Pass());
......
...@@ -37,7 +37,6 @@ class VIEWS_EXPORT StatusIconLinux { ...@@ -37,7 +37,6 @@ class VIEWS_EXPORT StatusIconLinux {
virtual ~StatusIconLinux(); virtual ~StatusIconLinux();
virtual void SetImage(const gfx::ImageSkia& image) = 0; virtual void SetImage(const gfx::ImageSkia& image) = 0;
virtual void SetPressedImage(const gfx::ImageSkia& image) = 0;
virtual void SetToolTip(const base::string16& tool_tip) = 0; virtual void SetToolTip(const base::string16& tool_tip) = 0;
// Invoked after a call to SetContextMenu() to let the platform-specific // Invoked after a call to SetContextMenu() to let the platform-specific
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment