Commit c821f28d authored by estade's avatar estade Committed by Commit bot

Remove last vestigial uses of "update needed" png assets.

They were out of date, and in some cases redundant. Remove
the redundant uses completely and replace the others with
references to the vector versions.

BUG=673995

Review-Url: https://codereview.chromium.org/2576643002
Cr-Commit-Position: refs/heads/master@{#438728}
parent fcf5015d
...@@ -627,9 +627,6 @@ ...@@ -627,9 +627,6 @@
<structure type="chrome_scaled_image" name="IDR_TRANSLATE" file="legacy/translate.png" /> <structure type="chrome_scaled_image" name="IDR_TRANSLATE" file="legacy/translate.png" />
<structure type="chrome_scaled_image" name="IDR_TRANSLATE_ACTIVE" file="legacy/translate_active.png" /> <structure type="chrome_scaled_image" name="IDR_TRANSLATE_ACTIVE" file="legacy/translate_active.png" />
</if> </if>
<structure type="chrome_scaled_image" name="IDR_UPDATE_MENU_SEVERITY_LOW" file="common/update_menu_severity_low.png" />
<structure type="chrome_scaled_image" name="IDR_UPDATE_MENU_SEVERITY_MEDIUM" file="common/update_menu_severity_medium.png" />
<structure type="chrome_scaled_image" name="IDR_UPDATE_MENU_SEVERITY_HIGH" file="common/update_menu_severity_high.png" />
<structure type="chrome_scaled_image" name="IDR_USB_NOTIFICATION_ICON" file="common/notification_usb_icon.png" /> <structure type="chrome_scaled_image" name="IDR_USB_NOTIFICATION_ICON" file="common/notification_usb_icon.png" />
<if expr="chromeos"> <if expr="chromeos">
<structure type="chrome_scaled_image" name="IDR_USER_IMAGE_CAPTURE" file="cros/snapshot_wide.png" /> <structure type="chrome_scaled_image" name="IDR_USER_IMAGE_CAPTURE" file="cros/snapshot_wide.png" />
......
...@@ -14,10 +14,11 @@ ...@@ -14,10 +14,11 @@
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chrome/grit/chromium_strings.h" #include "chrome/grit/chromium_strings.h"
#include "chrome/grit/theme_resources.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/vector_icons_public.h"
#include "ui/native_theme/native_theme.h"
RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile) RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile)
: elevation_needed_(false), : elevation_needed_(false),
...@@ -43,8 +44,7 @@ RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile) ...@@ -43,8 +44,7 @@ RecoveryInstallGlobalError::RecoveryInstallGlobalError(Profile* profile)
base::Unretained(this))); base::Unretained(this)));
} }
RecoveryInstallGlobalError::~RecoveryInstallGlobalError() { RecoveryInstallGlobalError::~RecoveryInstallGlobalError() {}
}
void RecoveryInstallGlobalError::Shutdown() { void RecoveryInstallGlobalError::Shutdown() {
GlobalErrorServiceFactory::GetForProfile(profile_)->RemoveUnownedGlobalError( GlobalErrorServiceFactory::GetForProfile(profile_)->RemoveUnownedGlobalError(
...@@ -68,8 +68,10 @@ base::string16 RecoveryInstallGlobalError::MenuItemLabel() { ...@@ -68,8 +68,10 @@ base::string16 RecoveryInstallGlobalError::MenuItemLabel() {
} }
gfx::Image RecoveryInstallGlobalError::MenuItemIcon() { gfx::Image RecoveryInstallGlobalError::MenuItemIcon() {
return ResourceBundle::GetSharedInstance().GetNativeImageNamed( return gfx::Image(gfx::CreateVectorIcon(
IDR_UPDATE_MENU_SEVERITY_HIGH); gfx::VectorIconId::BROWSER_TOOLS_UPDATE,
ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
ui::NativeTheme::kColorId_AlertSeverityHigh)));
} }
void RecoveryInstallGlobalError::ExecuteMenuItem(Browser* browser) { void RecoveryInstallGlobalError::ExecuteMenuItem(Browser* browser) {
...@@ -94,8 +96,9 @@ bool RecoveryInstallGlobalError::ShouldCloseOnDeactivate() const { ...@@ -94,8 +96,9 @@ bool RecoveryInstallGlobalError::ShouldCloseOnDeactivate() const {
} }
gfx::Image RecoveryInstallGlobalError::GetBubbleViewIcon() { gfx::Image RecoveryInstallGlobalError::GetBubbleViewIcon() {
return ResourceBundle::GetSharedInstance().GetNativeImageNamed( // TODO(estade): there shouldn't be an icon in the bubble, but
IDR_UPDATE_MENU_SEVERITY_HIGH); // GlobalErrorBubbleView currently requires it. See crbug.com/673995
return MenuItemIcon();
} }
base::string16 RecoveryInstallGlobalError::GetBubbleViewTitle() { base::string16 RecoveryInstallGlobalError::GetBubbleViewTitle() {
......
...@@ -88,15 +88,6 @@ base::string16 CriticalNotificationBubbleView::GetWindowTitle() const { ...@@ -88,15 +88,6 @@ base::string16 CriticalNotificationBubbleView::GetWindowTitle() const {
IDS_CRITICAL_NOTIFICATION_HEADLINE_ALTERNATE); IDS_CRITICAL_NOTIFICATION_HEADLINE_ALTERNATE);
} }
gfx::ImageSkia CriticalNotificationBubbleView::GetWindowIcon() {
return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
IDR_UPDATE_MENU_SEVERITY_HIGH);
}
bool CriticalNotificationBubbleView::ShouldShowWindowIcon() const {
return true;
}
void CriticalNotificationBubbleView::WindowClosing() { void CriticalNotificationBubbleView::WindowClosing() {
refresh_timer_.Stop(); refresh_timer_.Stop();
} }
......
...@@ -16,8 +16,6 @@ class CriticalNotificationBubbleView : public views::BubbleDialogDelegateView { ...@@ -16,8 +16,6 @@ class CriticalNotificationBubbleView : public views::BubbleDialogDelegateView {
// views::BubbleDialogDelegateView overrides: // views::BubbleDialogDelegateView overrides:
base::string16 GetWindowTitle() const override; base::string16 GetWindowTitle() const override;
gfx::ImageSkia GetWindowIcon() override;
bool ShouldShowWindowIcon() const override;
void WindowClosing() override; void WindowClosing() override;
bool Cancel() override; bool Cancel() override;
bool Accept() override; bool Accept() override;
......
...@@ -13,13 +13,11 @@ ...@@ -13,13 +13,11 @@
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "chrome/grit/chromium_strings.h" #include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/page_navigator.h" #include "content/public/browser/page_navigator.h"
#include "content/public/browser/user_metrics.h" #include "content/public/browser/user_metrics.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/views/controls/label.h" #include "ui/views/controls/label.h"
#include "ui/views/layout/fill_layout.h" #include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/layout_constants.h" #include "ui/views/layout/layout_constants.h"
...@@ -100,15 +98,6 @@ base::string16 OutdatedUpgradeBubbleView::GetWindowTitle() const { ...@@ -100,15 +98,6 @@ base::string16 OutdatedUpgradeBubbleView::GetWindowTitle() const {
return l10n_util::GetStringUTF16(IDS_UPGRADE_BUBBLE_TITLE); return l10n_util::GetStringUTF16(IDS_UPGRADE_BUBBLE_TITLE);
} }
gfx::ImageSkia OutdatedUpgradeBubbleView::GetWindowIcon() {
return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
IDR_UPDATE_MENU_SEVERITY_HIGH);
}
bool OutdatedUpgradeBubbleView::ShouldShowWindowIcon() const {
return true;
}
bool OutdatedUpgradeBubbleView::Cancel() { bool OutdatedUpgradeBubbleView::Cancel() {
content::RecordAction(base::UserMetricsAction("OutdatedUpgradeBubble.Later")); content::RecordAction(base::UserMetricsAction("OutdatedUpgradeBubble.Later"));
return true; return true;
......
...@@ -31,8 +31,6 @@ class OutdatedUpgradeBubbleView : public views::BubbleDialogDelegateView { ...@@ -31,8 +31,6 @@ class OutdatedUpgradeBubbleView : public views::BubbleDialogDelegateView {
// views::BubbleDialogDelegateView methods. // views::BubbleDialogDelegateView methods.
void WindowClosing() override; void WindowClosing() override;
base::string16 GetWindowTitle() const override; base::string16 GetWindowTitle() const override;
gfx::ImageSkia GetWindowIcon() override;
bool ShouldShowWindowIcon() const override;
bool Cancel() override; bool Cancel() override;
bool Accept() override; bool Accept() override;
void UpdateButton(views::LabelButton* button, ui::DialogButton type) override; void UpdateButton(views::LabelButton* button, ui::DialogButton type) override;
......
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