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