summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorsail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 20:35:44 +0000
committersail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-20 20:35:44 +0000
commit89d03e277a46afa96c83d3168b5b952a5970cf1a (patch)
tree7bcf2121999b03e2dbaa526fb9ff482000ea050f /chrome/browser
parentd19ea34f835815a4768bb03a6863eb3dba3613c1 (diff)
downloadchromium_src-89d03e277a46afa96c83d3168b5b952a5970cf1a.zip
chromium_src-89d03e277a46afa96c83d3168b5b952a5970cf1a.tar.gz
chromium_src-89d03e277a46afa96c83d3168b5b952a5970cf1a.tar.bz2
Revert high res icon changes
The new high res icon change may have caused a perf regression. To verify I'm reverting the following chnages: commit 3a360c6b3d2fc174cb7597d6365cfc5418d1442b r82326 Disable loading high res icons on Mac commit 3c39226937a39d0042b8a794f13505c7a25ca58b r82247 Fix reload button unit test commit f87ab117fc159566868e71e4df5672852bebd718 r82245 Unregister toolbar view from window notifications commit 0b287ba4a4ad5c19d901f973eb9af594dcf3dba1 r82239 Fix failing Mac unit tests commit 8b681c46a139d12151323952c58122f6805d7597 r82236 Mac: Remove custom drawn buttons commit 6ae8a2fe40485731b86267e362936db16b4c0706 r82209 Fix clang build break commit e8a19d1e0c76f204c834318566e4206320583449 r82185 Add support for multi resolution icons BUG=None TEST=Compling Review URL: http://codereview.chromium.org/6878077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_mac.mm1
-rw-r--r--chrome/browser/content_setting_image_model.cc1
-rw-r--r--chrome/browser/resources_util.cc5
-rw-r--r--chrome/browser/resources_util_unittest.cc1
-rw-r--r--chrome/browser/themes/browser_theme_pack.cc1
-rw-r--r--chrome/browser/themes/browser_theme_pack_unittest.cc1
-rw-r--r--chrome/browser/themes/theme_service.cc1
-rw-r--r--chrome/browser/themes/theme_service_mac.mm14
-rw-r--r--chrome/browser/ui/cocoa/background_gradient_view.mm1
-rw-r--r--chrome/browser/ui/cocoa/browser_frame_view.mm1
-rw-r--r--chrome/browser/ui/cocoa/clickhold_button_cell.h4
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_view.mm1
-rw-r--r--chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm18
-rw-r--r--chrome/browser/ui/cocoa/extensions/chevron_menu_button_unittest.mm1
-rw-r--r--chrome/browser/ui/cocoa/hover_image_button_unittest.mm1
-rw-r--r--chrome/browser/ui/cocoa/image_button_cell.h43
-rw-r--r--chrome/browser/ui/cocoa/image_button_cell.mm145
-rw-r--r--chrome/browser/ui/cocoa/image_button_cell_unittest.mm81
-rw-r--r--chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm1
-rw-r--r--chrome/browser/ui/cocoa/location_bar/star_decoration.mm1
-rw-r--r--chrome/browser/ui/cocoa/new_tab_button.mm5
-rw-r--r--chrome/browser/ui/cocoa/nsimage_cache_unittest.mm12
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm21
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_view.mm1
-rw-r--r--chrome/browser/ui/cocoa/toolbar/reload_button.mm35
-rw-r--r--chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm4
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm106
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_view.mm36
-rw-r--r--chrome/browser/ui/gtk/back_forward_button_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/browser_titlebar.cc1
-rw-r--r--chrome/browser/ui/gtk/browser_toolbar_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_service.cc1
-rw-r--r--chrome/browser/ui/gtk/gtk_util.cc1
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/reload_button_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc1
-rw-r--r--chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc1
-rw-r--r--chrome/browser/ui/tests/ui_gfx_image_unittest.cc4
-rw-r--r--chrome/browser/ui/tests/ui_gfx_image_unittest.mm6
-rw-r--r--chrome/browser/ui/touch/tabs/touch_tab.cc1
-rw-r--r--chrome/browser/ui/views/browser_actions_container.cc4
-rw-r--r--chrome/browser/ui/views/bubble/bubble_border.cc1
-rw-r--r--chrome/browser/ui/views/constrained_window_views.cc1
-rw-r--r--chrome/browser/ui/views/detachable_toolbar_view.cc1
-rw-r--r--chrome/browser/ui/views/find_bar_view.cc1
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc1
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc1
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc1
-rw-r--r--chrome/browser/ui/views/location_bar/star_view.cc1
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.cc1
-rw-r--r--chrome/browser/ui/views/tabs/base_tab.cc1
-rw-r--r--chrome/browser/ui/views/tabs/tab.cc1
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip.cc1
-rw-r--r--chrome/browser/ui/views/theme_background.cc1
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc1
-rw-r--r--chrome/browser/ui/webui/theme_source_unittest.cc1
59 files changed, 109 insertions, 476 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
index b2c0b48..fcd92f1 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
@@ -20,7 +20,6 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "net/base/escape.h"
#import "third_party/mozilla/NSPasteboard+Utils.h"
#include "ui/base/clipboard/clipboard.h"
diff --git a/chrome/browser/content_setting_image_model.cc b/chrome/browser/content_setting_image_model.cc
index c092872..f8419d9 100644
--- a/chrome/browser/content_setting_image_model.cc
+++ b/chrome/browser/content_setting_image_model.cc
@@ -11,7 +11,6 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
class ContentSettingBlockedImageModel : public ContentSettingImageModel {
diff --git a/chrome/browser/resources_util.cc b/chrome/browser/resources_util.cc
index 99a2743..ab2fe9d 100644
--- a/chrome/browser/resources_util.cc
+++ b/chrome/browser/resources_util.cc
@@ -9,7 +9,6 @@
#include "base/hash_tables.h"
#include "base/lazy_instance.h"
#include "grit/theme_resources_map.h"
-#include "grit/theme_resources_standard_map.h"
namespace {
@@ -24,10 +23,6 @@ class ThemeMap {
for (size_t i = 0; i < kThemeResourcesSize; ++i) {
id_map_[kThemeResources[i].name] = kThemeResources[i].value;
}
- for (size_t i = 0; i < kThemeResourcesStandardSize; ++i) {
- id_map_[kThemeResourcesStandard[i].name] =
- kThemeResourcesStandard[i].value;
- }
}
int GetId(const std::string& resource_name) {
diff --git a/chrome/browser/resources_util_unittest.cc b/chrome/browser/resources_util_unittest.cc
index de3d0d8..51651da 100644
--- a/chrome/browser/resources_util_unittest.cc
+++ b/chrome/browser/resources_util_unittest.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/resources_util.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
diff --git a/chrome/browser/themes/browser_theme_pack.cc b/chrome/browser/themes/browser_theme_pack.cc
index 4bdee1c..274cae3 100644
--- a/chrome/browser/themes/browser_theme_pack.cc
+++ b/chrome/browser/themes/browser_theme_pack.cc
@@ -13,7 +13,6 @@
#include "content/browser/browser_thread.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "net/base/file_stream.h"
#include "net/base/net_errors.h"
#include "third_party/skia/include/core/SkCanvas.h"
diff --git a/chrome/browser/themes/browser_theme_pack_unittest.cc b/chrome/browser/themes/browser_theme_pack_unittest.cc
index a94ed54..92dc94c 100644
--- a/chrome/browser/themes/browser_theme_pack_unittest.cc
+++ b/chrome/browser/themes/browser_theme_pack_unittest.cc
@@ -15,7 +15,6 @@
#include "content/browser/browser_thread.h"
#include "content/common/json_value_serializer.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/color_utils.h"
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 132208f..5d1c60e 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -17,7 +17,6 @@
#include "content/common/notification_type.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/resource/resource_bundle.h"
#if defined(OS_WIN)
diff --git a/chrome/browser/themes/theme_service_mac.mm b/chrome/browser/themes/theme_service_mac.mm
index c355e0d..30d359e 100644
--- a/chrome/browser/themes/theme_service_mac.mm
+++ b/chrome/browser/themes/theme_service_mac.mm
@@ -10,9 +10,7 @@
#include "chrome/browser/themes/browser_theme_pack.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
-#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/color_utils.h"
-#include "ui/gfx/image.h"
NSString* const kBrowserThemeDidChangeNotification =
@"BrowserThemeDidChangeNotification";
@@ -46,16 +44,8 @@ NSImage* ThemeService::GetNSImageNamed(int id, bool allow_default) const {
// SkBitmap > native conversion?
// - For consistency with other platforms.
// - To get the generated tinted images.
- NSImage* nsimage = nil;
- if (theme_pack_.get()) {
- SkBitmap* bitmap = theme_pack_->GetBitmapNamed(id);
- if (bitmap)
- nsimage = gfx::SkBitmapToNSImage(*bitmap);
- }
-
- if (!nsimage) {
- nsimage = rb_.GetNativeImageNamed(id);
- }
+ SkBitmap* bitmap = GetBitmapNamed(id);
+ NSImage* nsimage = gfx::SkBitmapToNSImage(*bitmap);
// We loaded successfully. Cache the image.
if (nsimage) {
diff --git a/chrome/browser/ui/cocoa/background_gradient_view.mm b/chrome/browser/ui/cocoa/background_gradient_view.mm
index 936e3c0..4f808c8 100644
--- a/chrome/browser/ui/cocoa/background_gradient_view.mm
+++ b/chrome/browser/ui/cocoa/background_gradient_view.mm
@@ -8,7 +8,6 @@
#import "chrome/browser/ui/cocoa/nsview_additions.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#define kToolbarTopOffset 12
#define kToolbarMaxHeight 100
diff --git a/chrome/browser/ui/cocoa/browser_frame_view.mm b/chrome/browser/ui/cocoa/browser_frame_view.mm
index 9e973c4..e487cc4 100644
--- a/chrome/browser/ui/cocoa/browser_frame_view.mm
+++ b/chrome/browser/ui/cocoa/browser_frame_view.mm
@@ -13,7 +13,6 @@
#import "chrome/browser/ui/cocoa/framed_browser_window.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
static const CGFloat kBrowserFrameViewPaintHeight = 60.0;
static const NSPoint kBrowserFrameViewPatternPhaseOffset = { -5, 3 };
diff --git a/chrome/browser/ui/cocoa/clickhold_button_cell.h b/chrome/browser/ui/cocoa/clickhold_button_cell.h
index 3f64117..d38ccb8 100644
--- a/chrome/browser/ui/cocoa/clickhold_button_cell.h
+++ b/chrome/browser/ui/cocoa/clickhold_button_cell.h
@@ -9,12 +9,12 @@
#import <Cocoa/Cocoa.h>
#include "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/image_button_cell.h"
+#import "chrome/browser/ui/cocoa/gradient_button_cell.h"
// A button cell that implements "click hold" behavior after a specified delay
// or after dragging. If click-hold is never enabled (e.g., if
// |-setEnableClickHold:| is never called), this behaves like a normal button.
-@interface ClickHoldButtonCell : ImageButtonCell {
+@interface ClickHoldButtonCell : GradientButtonCell {
@private
BOOL enableClickHold_;
NSTimeInterval clickHoldTimeout_;
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_view.mm b/chrome/browser/ui/cocoa/download/download_shelf_view.mm
index 0d9c72e..3ab757c 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_view.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_view.mm
@@ -9,7 +9,6 @@
#import "chrome/browser/ui/cocoa/themed_window.h"
#import "chrome/browser/ui/cocoa/view_id_util.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
@implementation DownloadShelfView
diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
index 3868a20..e8d899e 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm
@@ -20,7 +20,6 @@
#import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h"
#import "chrome/browser/ui/cocoa/extensions/chevron_menu_button.h"
#import "chrome/browser/ui/cocoa/extensions/extension_popup_controller.h"
-#import "chrome/browser/ui/cocoa/image_button_cell.h"
#import "chrome/browser/ui/cocoa/menu_button.h"
#include "chrome/common/extensions/extension_action.h"
#include "chrome/common/pref_names.h"
@@ -29,8 +28,6 @@
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
#include "content/common/notification_source.h"
-#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
NSString* const kBrowserActionVisibilityChangedNotification =
@@ -41,6 +38,10 @@ const CGFloat kAnimationDuration = 0.2;
const CGFloat kChevronWidth = 14.0;
+// Image used for the overflow button.
+NSString* const kOverflowChevronsName =
+ @"browser_actions_overflow_Template.pdf";
+
// Since the container is the maximum height of the toolbar, we have
// to move the buttons up by this amount in order to have them look
// vertically centered within the toolbar.
@@ -778,14 +779,9 @@ class ExtensionServiceObserverBridge : public NotificationObserver,
chevronMenuButton_.reset([[ChevronMenuButton alloc] init]);
[chevronMenuButton_ setBordered:NO];
[chevronMenuButton_ setShowsBorderOnlyWhileMouseInside:YES];
-
- [[chevronMenuButton_ cell] setImageID:IDR_BROWSER_ACTIONS_OVERFLOW
- forButtonState:image_button_cell::kDefaultState];
- [[chevronMenuButton_ cell] setImageID:IDR_BROWSER_ACTIONS_OVERFLOW_H
- forButtonState:image_button_cell::kHoverState];
- [[chevronMenuButton_ cell] setImageID:IDR_BROWSER_ACTIONS_OVERFLOW_P
- forButtonState:image_button_cell::kPressedState];
-
+ NSImage* chevronImage =
+ app::mac::GetCachedImageWithName(kOverflowChevronsName);
+ [chevronMenuButton_ setImage:chevronImage];
[containerView_ addSubview:chevronMenuButton_];
}
diff --git a/chrome/browser/ui/cocoa/extensions/chevron_menu_button_unittest.mm b/chrome/browser/ui/cocoa/extensions/chevron_menu_button_unittest.mm
index 0920592..4336c49c 100644
--- a/chrome/browser/ui/cocoa/extensions/chevron_menu_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/extensions/chevron_menu_button_unittest.mm
@@ -34,6 +34,7 @@ TEST_F(ChevronMenuButtonTest, CellSubclass) {
// Test both hovered and non-hovered display.
TEST_F(ChevronMenuButtonTest, HoverAndNonHoverDisplay) {
ChevronMenuButtonCell* cell = [button_ cell];
+ EXPECT_FALSE([cell showsBorderOnlyWhileMouseInside]);
EXPECT_FALSE([cell isMouseInside]);
[cell setShowsBorderOnlyWhileMouseInside:YES];
diff --git a/chrome/browser/ui/cocoa/hover_image_button_unittest.mm b/chrome/browser/ui/cocoa/hover_image_button_unittest.mm
index 22faa22..e25dc77 100644
--- a/chrome/browser/ui/cocoa/hover_image_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/hover_image_button_unittest.mm
@@ -8,7 +8,6 @@
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
#import "chrome/browser/ui/cocoa/hover_image_button.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/cocoa/image_button_cell.h b/chrome/browser/ui/cocoa/image_button_cell.h
deleted file mode 100644
index c049294..0000000
--- a/chrome/browser/ui/cocoa/image_button_cell.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_UI_COCOA_IMAGE_BUTTON_CELL_H_
-#define CHROME_BROWSER_UI_COCOA_IMAGE_BUTTON_CELL_H_
-#pragma once
-
-#import <Cocoa/Cocoa.h>
-
-namespace image_button_cell {
-
-// Possible states
-enum ButtonState {
- kDefaultState = 0,
- kHoverState,
- kPressedState,
- kDisabledState,
- kButtonStateCount
-};
-
-} // namespace ImageButtonCell
-
-// A button cell that can disable a different image for each possible button
-// state. Images are specified by image IDs.
-@interface ImageButtonCell : NSButtonCell {
- @private
- NSInteger imageID_[image_button_cell::kButtonStateCount];
- NSInteger overlayImageID_;
- BOOL isMouseInside_;
-}
-
-@property(assign, nonatomic) BOOL isMouseInside;
-@property(assign, nonatomic) NSInteger overlayImageID;
-
-// Sets the image for the given button state using an image ID.
-// The image will be lazy loaded from a resource pak.
-- (void)setImageID:(NSInteger)imageID
- forButtonState:(image_button_cell::ButtonState)state;
-
-@end
-
-#endif // CHROME_BROWSER_UI_COCOA_IMAGE_BUTTON_CELL_H_
diff --git a/chrome/browser/ui/cocoa/image_button_cell.mm b/chrome/browser/ui/cocoa/image_button_cell.mm
deleted file mode 100644
index fe7b89e..0000000
--- a/chrome/browser/ui/cocoa/image_button_cell.mm
+++ /dev/null
@@ -1,145 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "chrome/browser/ui/cocoa/image_button_cell.h"
-
-#include "base/logging.h"
-#import "chrome/browser/ui/cocoa/image_utils.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image.h"
-
-namespace {
-
-// Adjust the overlay position relative to the top right of the button image.
-const CGFloat kOverlayOffsetX = -3;
-const CGFloat kOverlayOffsetY = 5;
-
-// When the window doesn't have focus then we want to draw the button with a
-// slightly lighter color. We do this by just reducing the alpha.
-const CGFloat kImageNoFocusAlpha = 0.65;
-
-} // namespace
-
-@interface ImageButtonCell (Private)
-- (void)sharedInit;
-- (image_button_cell::ButtonState)currentButtonState;
-- (NSImage*)imageForID:(NSInteger)imageID;
-@end
-
-@implementation ImageButtonCell
-
-@synthesize isMouseInside = isMouseInside_;
-@synthesize overlayImageID = overlayImageID_;
-
-// For nib instantiations
-- (id)initWithCoder:(NSCoder*)decoder {
- if ((self = [super initWithCoder:decoder])) {
- [self sharedInit];
- }
- return self;
-}
-
-// For programmatic instantiations
-- (id)initTextCell:(NSString*)string {
- if ((self = [super initTextCell:string])) {
- [self sharedInit];
- }
- return self;
-}
-
-- (void)sharedInit {
- [self setHighlightsBy:NSNoCellMask];
-
- // We need to set this so that we can override |-mouseEntered:| and
- // |-mouseExited:| to change the button image on hover states.
- [self setShowsBorderOnlyWhileMouseInside:YES];
-}
-
-- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
- BOOL windowHasFocus = [[controlView window] isMainWindow] ||
- [[controlView window] isKeyWindow];
- CGFloat alpha = windowHasFocus ? 1.0 : kImageNoFocusAlpha;
-
- NSImage* image = [self imageForID:imageID_[[self currentButtonState]]];
- NSRect imageRect;
- imageRect.size = [image size];
- imageRect.origin.x = cellFrame.origin.x +
- roundf((cellFrame.size.width - imageRect.size.width) / 2.0);
- imageRect.origin.y = cellFrame.origin.y +
- roundf((cellFrame.size.height - imageRect.size.height) / 2.0);
-
- [image drawInRect:imageRect
- fromRect:NSZeroRect
- operation:NSCompositeSourceOver
- fraction:alpha
- neverFlipped:YES];
-
- if (overlayImageID_) {
- NSImage* overlayImage = [self imageForID:overlayImageID_];
- NSRect overlayRect;
- overlayRect.size = [overlayImage size];
- overlayRect.origin.x = NSMaxX(imageRect) - overlayRect.size.width +
- kOverlayOffsetX;
- overlayRect.origin.y = NSMinY(imageRect) + kOverlayOffsetY;
-
- [overlayImage drawInRect:overlayRect
- fromRect:NSZeroRect
- operation:NSCompositeSourceOver
- fraction:1.0
- neverFlipped:YES];
- }
-}
-
-- (void)setImageID:(NSInteger)imageID
- forButtonState:(image_button_cell::ButtonState)state {
- DCHECK_GE(state, 0);
- DCHECK_LT(state, image_button_cell::kButtonStateCount);
- if (imageID_[state] != imageID) {
- imageID_[state] = imageID;
- [[self controlView] setNeedsDisplay:YES];
- }
-}
-
-- (void)setOverlayImageID:(NSInteger)imageID {
- if (overlayImageID_ != imageID) {
- overlayImageID_ = imageID;
- [[self controlView] setNeedsDisplay:YES];
- }
-}
-
-- (image_button_cell::ButtonState)currentButtonState {
- if (![self isEnabled] && imageID_[image_button_cell::kDisabledState])
- return image_button_cell::kDisabledState;
- else if ([self isHighlighted] && imageID_[image_button_cell::kPressedState])
- return image_button_cell::kPressedState;
- else if ([self isMouseInside] && imageID_[image_button_cell::kHoverState])
- return image_button_cell::kHoverState;
- else
- return image_button_cell::kDefaultState;
-}
-
-- (NSImage*)imageForID:(NSInteger)imageID {
- if (!imageID)
- return nil;
-
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- return rb.GetNativeImageNamed(imageID);
-}
-
-- (void)setIsMouseInside:(BOOL)isMouseInside {
- if (isMouseInside_ != isMouseInside) {
- isMouseInside_ = isMouseInside;
- [[self controlView] setNeedsDisplay:YES];
- }
-}
-
-- (void)mouseEntered:(NSEvent*)theEvent {
- [self setIsMouseInside:YES];
-}
-
-- (void)mouseExited:(NSEvent*)theEvent {
- [self setIsMouseInside:NO];
-}
-
-@end
diff --git a/chrome/browser/ui/cocoa/image_button_cell_unittest.mm b/chrome/browser/ui/cocoa/image_button_cell_unittest.mm
deleted file mode 100644
index c9a8c63..0000000
--- a/chrome/browser/ui/cocoa/image_button_cell_unittest.mm
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
-#import "chrome/browser/ui/cocoa/image_button_cell.h"
-#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
-
-namespace {
-
-class ImageButtonCellTest : public CocoaTest {
- public:
- ImageButtonCellTest() {
- NSRect frame = NSMakeRect(0, 0, 50, 30);
- scoped_nsobject<NSButton>view([[NSButton alloc] initWithFrame:frame]);
- view_ = view.get();
- scoped_nsobject<ImageButtonCell> cell(
- [[ImageButtonCell alloc] initTextCell:@""]);
- [view_ setCell:cell.get()];
- [[test_window() contentView] addSubview:view_];
- }
-
- void SetImages() {
- [[view_ cell] setImageID:IDR_BACK
- forButtonState:image_button_cell::kDefaultState];
- [[view_ cell] setImageID:IDR_BACK_H
- forButtonState:image_button_cell::kHoverState];
- [[view_ cell] setImageID:IDR_BACK_P
- forButtonState:image_button_cell::kPressedState];
- [[view_ cell] setImageID:IDR_BACK_D
- forButtonState:image_button_cell::kDisabledState];
- }
-
- NSButton* view_;
-};
-
-// Test drawing, mostly to ensure nothing leaks or crashes.
-TEST_F(ImageButtonCellTest, DisplayWithHover) {
- SetImages();
- EXPECT_FALSE([[view_ cell] isMouseInside]);
- [view_ display];
- [[view_ cell] setIsMouseInside:YES];
- [view_ display];
-
- // Unset the hover image and draw.
- [[view_ cell] setImageID:0
- forButtonState:image_button_cell::kHoverState];
- [view_ display];
-}
-
-// Test drawing, mostly to ensure nothing leaks or crashes.
-TEST_F(ImageButtonCellTest, DisplayWithPressed) {
- SetImages();
- EXPECT_FALSE([[view_ cell] isHighlighted]);
- [view_ display];
- [[view_ cell] setHighlighted:YES];
- [view_ display];
-
- // Unset the pressed image and draw.
- [[view_ cell] setImageID:0
- forButtonState:image_button_cell::kPressedState];
- [view_ display];
-}
-
-// Test drawing, mostly to ensure nothing leaks or crashes.
-TEST_F(ImageButtonCellTest, DisplayWithDisabled) {
- SetImages();
- EXPECT_TRUE([[view_ cell] isEnabled]);
- [view_ display];
- [[view_ cell] setEnabled:NO];
- [view_ display];
-
- // Unset the disabled image and draw.
- [[view_ cell] setImageID:0
- forButtonState:image_button_cell::kDisabledState];
- [view_ display];
-}
-
-} // namespace
diff --git a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm
index b9d714e..c3db857 100644
--- a/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/selected_keyword_decoration.mm
@@ -9,7 +9,6 @@
#import "chrome/browser/ui/cocoa/image_utils.h"
#include "chrome/browser/ui/omnibox/location_bar_util.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util_mac.h"
diff --git a/chrome/browser/ui/cocoa/location_bar/star_decoration.mm b/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
index c3e1d48..5ae432e 100644
--- a/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/star_decoration.mm
@@ -9,7 +9,6 @@
#include "chrome/browser/command_updater.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util_mac.h"
namespace {
diff --git a/chrome/browser/ui/cocoa/new_tab_button.mm b/chrome/browser/ui/cocoa/new_tab_button.mm
index ad719b8..6a97d3b 100644
--- a/chrome/browser/ui/cocoa/new_tab_button.mm
+++ b/chrome/browser/ui/cocoa/new_tab_button.mm
@@ -3,14 +3,9 @@
// found in the LICENSE file.
#import "chrome/browser/ui/cocoa/new_tab_button.h"
-#import "chrome/browser/ui/cocoa/image_button_cell.h"
@implementation NewTabButton
-+ (Class)cellClass {
- return [ImageButtonCell class];
-}
-
// Approximate the shape. It doesn't need to be perfect. This will need to be
// updated if the size or shape of the icon ever changes.
// TODO(pinkerton): use a click mask image instead of hard-coding points.
diff --git a/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm b/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
index b3c336a..5425125 100644
--- a/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
+++ b/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
@@ -32,13 +32,13 @@ class NSImageCacheTest : public PlatformTest {
};
TEST_F(NSImageCacheTest, LookupFound) {
- EXPECT_TRUE(app::mac::GetCachedImageWithName(@"product_logo_32.png") != nil)
+ EXPECT_TRUE(app::mac::GetCachedImageWithName(@"back_Template.pdf") != nil)
<< "Failed to find the toolbar image?";
}
TEST_F(NSImageCacheTest, LookupCached) {
- EXPECT_EQ(app::mac::GetCachedImageWithName(@"product_logo_32.png"),
- app::mac::GetCachedImageWithName(@"product_logo_32.png"))
+ EXPECT_EQ(app::mac::GetCachedImageWithName(@"back_Template.pdf"),
+ app::mac::GetCachedImageWithName(@"back_Template.pdf"))
<< "Didn't get the same NSImage back?";
}
@@ -48,14 +48,14 @@ TEST_F(NSImageCacheTest, LookupMiss) {
}
TEST_F(NSImageCacheTest, LookupFoundAndClear) {
- NSImage *first = app::mac::GetCachedImageWithName(@"product_logo_32.png");
+ NSImage *first = app::mac::GetCachedImageWithName(@"back_Template.pdf");
// Hang on to the first image so that the second one doesn't get allocated
// in the same location by (bad) luck.
[[first retain] autorelease];
EXPECT_TRUE(first != nil)
<< "Failed to find the toolbar image?";
app::mac::ClearCachedImages();
- NSImage *second = app::mac::GetCachedImageWithName(@"product_logo_32.png");
+ NSImage *second = app::mac::GetCachedImageWithName(@"back_Template.pdf");
EXPECT_TRUE(second != nil)
<< "Failed to find the toolbar image...again?";
EXPECT_NE(second, first)
@@ -64,7 +64,7 @@ TEST_F(NSImageCacheTest, LookupFoundAndClear) {
TEST_F(NSImageCacheTest, AutoTemplating) {
NSImage *templateImage =
- app::mac::GetCachedImageWithName(@"find_next_Template.pdf");
+ app::mac::GetCachedImageWithName(@"back_Template.pdf");
EXPECT_TRUE([templateImage isTemplate] == YES)
<< "Image ending in 'Template' should be marked as being a template";
NSImage *nonTemplateImage =
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index b80994b..32c97df 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -31,7 +31,6 @@
#include "chrome/browser/ui/find_bar/find_tab_helper.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/constrained_window_mac.h"
-#import "chrome/browser/ui/cocoa/image_button_cell.h"
#import "chrome/browser/ui/cocoa/new_tab_button.h"
#import "chrome/browser/ui/cocoa/profile_menu_button.h"
#import "chrome/browser/ui/cocoa/tab_contents/favicon_util.h"
@@ -55,7 +54,6 @@
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
#include "ui/base/l10n/l10n_util.h"
@@ -81,6 +79,11 @@ enum {
namespace {
+// The images names used for different states of the new tab button.
+NSString* const kNewTabHoverImage = @"newtab_h.pdf";
+NSString* const kNewTabImage = @"newtab.pdf";
+NSString* const kNewTabPressedImage = @"newtab_p.pdf";
+
// A value to indicate tab layout should use the full available width of the
// view.
const CGFloat kUseFullAvailableWidth = -1.0;
@@ -388,12 +391,9 @@ class NotificationBridge : public NotificationObserver {
// Set the images from code because Cocoa fails to find them in our sub
// bundle during tests.
- [[newTabButton_ cell] setImageID:IDR_NEWTAB_BUTTON
- forButtonState:image_button_cell::kDefaultState];
- [[newTabButton_ cell] setImageID:IDR_NEWTAB_BUTTON_H
- forButtonState:image_button_cell::kHoverState];
- [[newTabButton_ cell] setImageID:IDR_NEWTAB_BUTTON_P
- forButtonState:image_button_cell::kPressedState];
+ [newTabButton_ setImage:app::mac::GetCachedImageWithName(kNewTabImage)];
+ [newTabButton_ setAlternateImage:
+ app::mac::GetCachedImageWithName(kNewTabPressedImage)];
newTabButtonShowingHoverImage_ = NO;
newTabTrackingArea_.reset(
[[CrTrackingArea alloc] initWithRect:[newTabButton_ bounds]
@@ -1731,10 +1731,11 @@ class NotificationBridge : public NotificationObserver {
- (void)setNewTabButtonHoverState:(BOOL)shouldShowHover {
if (shouldShowHover && !newTabButtonShowingHoverImage_) {
newTabButtonShowingHoverImage_ = YES;
- [[newTabButton_ cell] setIsMouseInside:YES];
+ [newTabButton_ setImage:
+ app::mac::GetCachedImageWithName(kNewTabHoverImage)];
} else if (!shouldShowHover && newTabButtonShowingHoverImage_) {
newTabButtonShowingHoverImage_ = NO;
- [[newTabButton_ cell] setIsMouseInside:NO];
+ [newTabButton_ setImage:app::mac::GetCachedImageWithName(kNewTabImage)];
}
}
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.mm b/chrome/browser/ui/cocoa/tabs/tab_view.mm
index bb86e3c..ecab140 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm
@@ -15,7 +15,6 @@
#import "chrome/browser/ui/cocoa/view_id_util.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
namespace {
diff --git a/chrome/browser/ui/cocoa/toolbar/reload_button.mm b/chrome/browser/ui/cocoa/toolbar/reload_button.mm
index 406e3bd..a00ee25 100644
--- a/chrome/browser/ui/cocoa/toolbar/reload_button.mm
+++ b/chrome/browser/ui/cocoa/toolbar/reload_button.mm
@@ -7,15 +7,16 @@
#include "ui/base/l10n/l10n_util.h"
#include "app/mac/nsimage_cache.h"
#include "chrome/app/chrome_command_ids.h"
-#import "chrome/browser/ui/cocoa/image_button_cell.h"
+#import "chrome/browser/ui/cocoa/gradient_button_cell.h"
#import "chrome/browser/ui/cocoa/view_id_util.h"
#include "grit/generated_resources.h"
-#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util_mac.h"
namespace {
+NSString* const kReloadImageName = @"reload_Template.pdf";
+NSString* const kStopImageName = @"stop_Template.pdf";
+
// Constant matches Windows.
NSTimeInterval kPendingReloadTimeout = 1.35;
@@ -23,10 +24,6 @@ NSTimeInterval kPendingReloadTimeout = 1.35;
@implementation ReloadButton
-+ (Class)cellClass {
- return [ImageButtonCell class];
-}
-
- (void)dealloc {
if (trackingArea_) {
[self removeTrackingArea:trackingArea_];
@@ -72,26 +69,10 @@ NSTimeInterval kPendingReloadTimeout = 1.35;
[self setTag:anInt];
if (anInt == IDC_RELOAD) {
- [[self cell] setImageID:IDR_RELOAD
- forButtonState:image_button_cell::kDefaultState];
- [[self cell] setImageID:IDR_RELOAD_H
- forButtonState:image_button_cell::kHoverState];
- [[self cell] setImageID:IDR_RELOAD_P
- forButtonState:image_button_cell::kPressedState];
- // The stop button has a disabled image but the reload button doesn't. To
- // unset it we have to explicilty change the image ID to 0.
- [[self cell] setImageID:0
- forButtonState:image_button_cell::kDisabledState];
+ [self setImage:app::mac::GetCachedImageWithName(kReloadImageName)];
[self setToolTip:l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_RELOAD)];
} else if (anInt == IDC_STOP) {
- [[self cell] setImageID:IDR_STOP
- forButtonState:image_button_cell::kDefaultState];
- [[self cell] setImageID:IDR_STOP_H
- forButtonState:image_button_cell::kHoverState];
- [[self cell] setImageID:IDR_STOP_P
- forButtonState:image_button_cell::kPressedState];
- [[self cell] setImageID:IDR_STOP_D
- forButtonState:image_button_cell::kDisabledState];
+ [self setImage:app::mac::GetCachedImageWithName(kStopImageName)];
[self setToolTip:l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_STOP)];
} else {
NOTREACHED();
@@ -115,8 +96,8 @@ NSTimeInterval kPendingReloadTimeout = 1.35;
// sure the cell's sense of mouse-inside matches the local sense, to prevent
// drawing artifacts.
id cell = [self cell];
- if ([cell respondsToSelector:@selector(setIsMouseInside:)])
- [cell setIsMouseInside:[self isMouseInside]];
+ if ([cell respondsToSelector:@selector(setMouseInside:animate:)])
+ [cell setMouseInside:[self isMouseInside] animate:NO];
[self setEnabled:YES];
} else if ([self tag] == IDC_STOP && !pendingReloadTimer_) {
[self setEnabled:NO];
diff --git a/chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm b/chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm
index 29a5acd..4a46107 100644
--- a/chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/toolbar/reload_button_unittest.mm
@@ -77,15 +77,19 @@ TEST_F(ReloadButtonTest, UpdateTag) {
[button_ updateTag:IDC_RELOAD];
EXPECT_EQ(IDC_RELOAD, [button_ tag]);
+ NSImage* reloadImage = [button_ image];
NSString* const reloadToolTip = [button_ toolTip];
[button_ updateTag:IDC_STOP];
EXPECT_EQ(IDC_STOP, [button_ tag]);
+ NSImage* stopImage = [button_ image];
NSString* const stopToolTip = [button_ toolTip];
+ EXPECT_NSNE(reloadImage, stopImage);
EXPECT_NSNE(reloadToolTip, stopToolTip);
[button_ updateTag:IDC_RELOAD];
EXPECT_EQ(IDC_RELOAD, [button_ tag]);
+ EXPECT_NSEQ(reloadImage, [button_ image]);
EXPECT_NSEQ(reloadToolTip, [button_ toolTip]);
}
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index 7aa4def..c681b9b 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -29,7 +29,6 @@
#import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h"
#import "chrome/browser/ui/cocoa/extensions/browser_actions_controller.h"
#import "chrome/browser/ui/cocoa/gradient_button_cell.h"
-#import "chrome/browser/ui/cocoa/image_button_cell.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
#import "chrome/browser/ui/cocoa/menu_button.h"
@@ -52,7 +51,6 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
#include "ui/base/models/accelerator_cocoa.h"
@@ -63,6 +61,14 @@
namespace {
+// Names of images in the bundle for buttons.
+NSString* const kBackButtonImageName = @"back_Template.pdf";
+NSString* const kForwardButtonImageName = @"forward_Template.pdf";
+NSString* const kReloadButtonReloadImageName = @"reload_Template.pdf";
+NSString* const kReloadButtonStopImageName = @"stop_Template.pdf";
+NSString* const kHomeButtonImageName = @"home_Template.pdf";
+NSString* const kWrenchButtonImageName = @"tools_Template.pdf";
+
// Height of the toolbar in pixels when the bookmark bar is closed.
const CGFloat kBaseToolbarHeight = 35.0;
@@ -221,49 +227,29 @@ class NotificationBridge : public NotificationObserver {
// Now we can hook up bridges that rely on UI objects such as the location
// bar and button state.
- (void)awakeFromNib {
- [[backButton_ cell] setImageID:IDR_BACK
- forButtonState:image_button_cell::kDefaultState];
- [[backButton_ cell] setImageID:IDR_BACK_H
- forButtonState:image_button_cell::kHoverState];
- [[backButton_ cell] setImageID:IDR_BACK_P
- forButtonState:image_button_cell::kPressedState];
- [[backButton_ cell] setImageID:IDR_BACK_D
- forButtonState:image_button_cell::kDisabledState];
-
- [[forwardButton_ cell] setImageID:IDR_FORWARD
- forButtonState:image_button_cell::kDefaultState];
- [[forwardButton_ cell] setImageID:IDR_FORWARD_H
- forButtonState:image_button_cell::kHoverState];
- [[forwardButton_ cell] setImageID:IDR_FORWARD_P
- forButtonState:image_button_cell::kPressedState];
- [[forwardButton_ cell] setImageID:IDR_FORWARD_D
- forButtonState:image_button_cell::kDisabledState];
-
- [[reloadButton_ cell] setImageID:IDR_RELOAD
- forButtonState:image_button_cell::kDefaultState];
- [[reloadButton_ cell] setImageID:IDR_RELOAD_H
- forButtonState:image_button_cell::kHoverState];
- [[reloadButton_ cell] setImageID:IDR_RELOAD_P
- forButtonState:image_button_cell::kPressedState];
-
- [[homeButton_ cell] setImageID:IDR_HOME
- forButtonState:image_button_cell::kDefaultState];
- [[homeButton_ cell] setImageID:IDR_HOME_H
- forButtonState:image_button_cell::kHoverState];
- [[homeButton_ cell] setImageID:IDR_HOME_P
- forButtonState:image_button_cell::kPressedState];
-
- [[wrenchButton_ cell] setImageID:IDR_TOOLS
- forButtonState:image_button_cell::kDefaultState];
- [[wrenchButton_ cell] setImageID:IDR_TOOLS_H
- forButtonState:image_button_cell::kHoverState];
- [[wrenchButton_ cell] setImageID:IDR_TOOLS_P
- forButtonState:image_button_cell::kPressedState];
-
+ // A bug in AppKit (<rdar://7298597>, <http://openradar.me/7298597>) causes
+ // images loaded directly from nibs in a framework to not get their "template"
+ // flags set properly. Thus, despite the images being set on the buttons in
+ // the xib, we must set them in code.
+ [backButton_ setImage:app::mac::GetCachedImageWithName(kBackButtonImageName)];
+ [forwardButton_ setImage:
+ app::mac::GetCachedImageWithName(kForwardButtonImageName)];
+ [reloadButton_ setImage:
+ app::mac::GetCachedImageWithName(kReloadButtonReloadImageName)];
+ [homeButton_ setImage:
+ app::mac::GetCachedImageWithName(kHomeButtonImageName)];
+ [wrenchButton_ setImage:
+ app::mac::GetCachedImageWithName(kWrenchButtonImageName)];
[self badgeWrenchMenuIfNeeded];
[wrenchButton_ setOpenMenuOnClick:YES];
+ [backButton_ setShowsBorderOnlyWhileMouseInside:YES];
+ [forwardButton_ setShowsBorderOnlyWhileMouseInside:YES];
+ [reloadButton_ setShowsBorderOnlyWhileMouseInside:YES];
+ [homeButton_ setShowsBorderOnlyWhileMouseInside:YES];
+ [wrenchButton_ setShowsBorderOnlyWhileMouseInside:YES];
+
[backButton_ setHandleMiddleClick:YES];
[forwardButton_ setHandleMiddleClick:YES];
[reloadButton_ setHandleMiddleClick:YES];
@@ -555,10 +541,40 @@ class NotificationBridge : public NotificationObserver {
}
- (void)badgeWrenchMenuIfNeeded {
- if (UpgradeDetector::GetInstance()->notify_upgrade())
- [[wrenchButton_ cell] setOverlayImageID:IDR_UPDATE_BADGE];
- else
- [[wrenchButton_ cell] setOverlayImageID:0];
+
+ int badgeResource = 0;
+ if (UpgradeDetector::GetInstance()->notify_upgrade()) {
+ badgeResource = IDR_UPDATE_BADGE;
+ } else {
+ // No badge - clear the badge if one is already set.
+ if ([[wrenchButton_ cell] overlayImage])
+ [[wrenchButton_ cell] setOverlayImage:nil];
+ return;
+ }
+
+ NSImage* badge =
+ ResourceBundle::GetSharedInstance().GetNativeImageNamed(badgeResource);
+ NSImage* wrenchImage =
+ app::mac::GetCachedImageWithName(kWrenchButtonImageName);
+ NSSize wrenchImageSize = [wrenchImage size];
+ NSSize badgeSize = [badge size];
+
+ scoped_nsobject<NSImage> overlayImage(
+ [[NSImage alloc] initWithSize:wrenchImageSize]);
+
+ // Draw badge in the upper right corner of the button.
+ NSPoint overlayPosition =
+ NSMakePoint(wrenchImageSize.width - badgeSize.width,
+ wrenchImageSize.height - badgeSize.height);
+
+ [overlayImage lockFocus];
+ [badge drawAtPoint:overlayPosition
+ fromRect:NSZeroRect
+ operation:NSCompositeSourceOver
+ fraction:1.0];
+ [overlayImage unlockFocus];
+
+ [[wrenchButton_ cell] setOverlayImage:overlayImage];
}
- (void)prefChanged:(std::string*)prefName {
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_view.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_view.mm
index 75f25e0..9f1b879 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_view.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_view.mm
@@ -44,40 +44,4 @@
return VIEW_ID_TOOLBAR;
}
-// Some toolbar buttons draw differently depending on the fouc state of the
-// window.
-- (void)windowFocusDidChange:(NSNotification*)notification {
- [self setNeedsDisplay:YES];
-}
-
-- (void)viewWillMoveToWindow:(NSWindow*)window {
- if ([self window]) {
- [[NSNotificationCenter defaultCenter]
- removeObserver:self
- name:NSWindowDidBecomeKeyNotification
- object:[self window]];
- [[NSNotificationCenter defaultCenter]
- removeObserver:self
- name:NSWindowDidBecomeMainNotification
- object:[self window]];
- }
- if (window) {
- [[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(windowFocusDidChange:)
- name:NSWindowDidBecomeKeyNotification
- object:[self window]];
- [[NSNotificationCenter defaultCenter]
- addObserver:self
- selector:@selector(windowFocusDidChange:)
- name:NSWindowDidBecomeMainNotification
- object:[self window]];
- }
-}
-
-- (void)dealloc {
- [[NSNotificationCenter defaultCenter] removeObserver:self];
- [super dealloc];
-}
-
@end
diff --git a/chrome/browser/ui/gtk/back_forward_button_gtk.cc b/chrome/browser/ui/gtk/back_forward_button_gtk.cc
index 4b2a796..c6c1a98 100644
--- a/chrome/browser/ui/gtk/back_forward_button_gtk.cc
+++ b/chrome/browser/ui/gtk/back_forward_button_gtk.cc
@@ -16,7 +16,6 @@
#include "chrome/browser/ui/toolbar/back_forward_menu_model.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
// The time in milliseconds between when the user clicks and the menu appears.
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index 9a72fba..c89f3c8 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -34,7 +34,6 @@
#include "content/common/notification_type.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/gfx/canvas_skia_paint.h"
#include "ui/gfx/gtk_util.h"
diff --git a/chrome/browser/ui/gtk/browser_titlebar.cc b/chrome/browser/ui/gtk/browser_titlebar.cc
index 7e22346..81cab17 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.cc
+++ b/chrome/browser/ui/gtk/browser_titlebar.cc
@@ -38,7 +38,6 @@
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/gtk_util.h"
diff --git a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
index d9bf268..2919160 100644
--- a/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_toolbar_gtk.cc
@@ -46,7 +46,6 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/accelerator_gtk.h"
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index ac24d2c..21010f0 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -85,7 +85,6 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/gtk_util.h"
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index ced0710..8e433d6 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -30,7 +30,6 @@
#include "content/common/notification_type.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h"
diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc
index edd0022..1f0b002 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -32,7 +32,6 @@
#include "content/common/renderer_preferences.h"
#include "googleurl/src/gurl.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 0bbe026..70c7c7b 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -54,7 +54,6 @@
#include "content/common/page_transition_types.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "net/base/net_util.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
index 8e2ce41..82678b3 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
@@ -37,7 +37,6 @@
#include "content/common/notification_type.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/gtk/reload_button_gtk.cc b/chrome/browser/ui/gtk/reload_button_gtk.cc
index 0401f62..fd001ca 100644
--- a/chrome/browser/ui/gtk/reload_button_gtk.cc
+++ b/chrome/browser/ui/gtk/reload_button_gtk.cc
@@ -16,7 +16,6 @@
#include "content/common/notification_source.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/l10n/l10n_util.h"
// The width of this button in GTK+ theme mode. The Stop and Refresh stock icons
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
index 26ed8d4..a3f792a 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -22,7 +22,6 @@
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/animation/throb_animation.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
index 8688b10..d5241cd 100644
--- a/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc
@@ -28,7 +28,6 @@
#include "content/common/notification_type.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
diff --git a/chrome/browser/ui/tests/ui_gfx_image_unittest.cc b/chrome/browser/ui/tests/ui_gfx_image_unittest.cc
index 7c8f100..cfe1c9b 100644
--- a/chrome/browser/ui/tests/ui_gfx_image_unittest.cc
+++ b/chrome/browser/ui/tests/ui_gfx_image_unittest.cc
@@ -6,7 +6,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image.h"
-#include "ui/gfx/image_unittest_util.h"
+#include "ui/gfx/image_unittest.h"
#if defined(OS_LINUX)
#include <gtk/gtk.h>
@@ -43,7 +43,7 @@ TEST(UiGfxImageTest, GtkImageView) {
GtkWidget* fixed = gtk_fixed_new();
gtk_container_add(GTK_CONTAINER(window), fixed);
- gfx::Image image(gfx::test::CreateBitmap(25, 25));
+ gfx::Image image(gfx::test::CreateBitmap());
GtkWidget* image_view = gtk_image_new_from_pixbuf(image);
gtk_fixed_put(GTK_FIXED(fixed), image_view, 10, 10);
gtk_widget_set_size_request(image_view, 25, 25);
diff --git a/chrome/browser/ui/tests/ui_gfx_image_unittest.mm b/chrome/browser/ui/tests/ui_gfx_image_unittest.mm
index 7245ff1..9f62332 100644
--- a/chrome/browser/ui/tests/ui_gfx_image_unittest.mm
+++ b/chrome/browser/ui/tests/ui_gfx_image_unittest.mm
@@ -9,7 +9,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image.h"
-#include "ui/gfx/image_unittest_util.h"
+#include "ui/gfx/image_unittest.h"
namespace {
@@ -17,7 +17,7 @@ class UiGfxImageTest : public CocoaTest {
};
TEST_F(UiGfxImageTest, CheckColor) {
- gfx::Image image(gfx::test::CreateBitmap(25, 25));
+ gfx::Image image(gfx::test::CreateBitmap());
[image lockFocus];
NSColor* color = NSReadPixel(NSMakePoint(10, 10));
[image unlockFocus];
@@ -42,7 +42,7 @@ TEST_F(UiGfxImageTest, ImageView) {
[[test_window() contentView] addSubview:image_view];
[test_window() orderFront:nil];
- gfx::Image image(gfx::test::CreateBitmap(25, 25));
+ gfx::Image image(gfx::test::CreateBitmap());
[image_view setImage:image];
}
diff --git a/chrome/browser/ui/touch/tabs/touch_tab.cc b/chrome/browser/ui/touch/tabs/touch_tab.cc
index 11d3b5b..e4ec73f 100644
--- a/chrome/browser/ui/touch/tabs/touch_tab.cc
+++ b/chrome/browser/ui/touch/tabs/touch_tab.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/themes/theme_service.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/favicon_size.h"
diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc
index 942d92d..3fd12be 100644
--- a/chrome/browser/ui/views/browser_actions_container.cc
+++ b/chrome/browser/ui/views/browser_actions_container.cc
@@ -29,8 +29,6 @@
#include "content/common/notification_type.h"
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
-#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/base/accessibility/accessible_view_state.h"
@@ -47,6 +45,8 @@
#include "views/metrics.h"
#include "views/window/window.h"
+#include "grit/theme_resources.h"
+
// Horizontal spacing between most items in the container, as well as after the
// last item or chevron (if visible).
static const int kItemSpacing = ToolbarView::kStandardSpacing;
diff --git a/chrome/browser/ui/views/bubble/bubble_border.cc b/chrome/browser/ui/views/bubble/bubble_border.cc
index 98c3f3d..1a05b17 100644
--- a/chrome/browser/ui/views/bubble/bubble_border.cc
+++ b/chrome/browser/ui/views/bubble/bubble_border.cc
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas_skia.h"
diff --git a/chrome/browser/ui/views/constrained_window_views.cc b/chrome/browser/ui/views/constrained_window_views.cc
index 977bfd8..24ad971 100644
--- a/chrome/browser/ui/views/constrained_window_views.cc
+++ b/chrome/browser/ui/views/constrained_window_views.cc
@@ -19,7 +19,6 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "net/base/net_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
diff --git a/chrome/browser/ui/views/detachable_toolbar_view.cc b/chrome/browser/ui/views/detachable_toolbar_view.cc
index 04aa0d5..5e92c489 100644
--- a/chrome/browser/ui/views/detachable_toolbar_view.cc
+++ b/chrome/browser/ui/views/detachable_toolbar_view.cc
@@ -6,7 +6,6 @@
#include "chrome/browser/themes/theme_service.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkShader.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index 31366ca..1f1d80c 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -21,7 +21,6 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index 69604e5..9fa33d5 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -23,7 +23,6 @@
#include "content/common/notification_service.h"
#include "grit/app_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/theme_provider.h"
#include "ui/gfx/canvas_skia.h"
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 20616aa7..3fb7a61 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -16,7 +16,6 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index a3f4b82..cb193b8 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -38,7 +38,6 @@
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/views/location_bar/star_view.cc b/chrome/browser/ui/views/location_bar/star_view.cc
index 8e24153..d531c43 100644
--- a/chrome/browser/ui/views/location_bar/star_view.cc
+++ b/chrome/browser/ui/views/location_bar/star_view.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/ui/views/browser_dialogs.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc
index cdd4a5a..ce59089 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view.cc
@@ -22,7 +22,6 @@
#include "content/common/notification_type.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/animation/slide_animation.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/views/tabs/base_tab.cc b/chrome/browser/ui/views/tabs/base_tab.cc
index 9368313..2e9f222 100644
--- a/chrome/browser/ui/views/tabs/base_tab.cc
+++ b/chrome/browser/ui/views/tabs/base_tab.cc
@@ -18,7 +18,6 @@
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/animation/animation_container.h"
#include "ui/base/animation/slide_animation.h"
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index bafe9a1..424d052 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -12,7 +12,6 @@
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/base/animation/multi_animation.h"
#include "ui/base/animation/slide_animation.h"
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 7ab2f3a..c3a187e 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -16,7 +16,6 @@
#include "chrome/browser/ui/views/tabs/tab_strip_controller.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/animation/animation_container.h"
#include "ui/base/dragdrop/drag_drop_types.h"
diff --git a/chrome/browser/ui/views/theme_background.cc b/chrome/browser/ui/views/theme_background.cc
index 982117a..6fd601b 100644
--- a/chrome/browser/ui/views/theme_background.cc
+++ b/chrome/browser/ui/views/theme_background.cc
@@ -11,7 +11,6 @@
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
#include "views/view.h"
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index c0d4bdb..7c28752 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -23,7 +23,6 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "ui/base/accessibility/accessible_view_state.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/webui/theme_source_unittest.cc b/chrome/browser/ui/webui/theme_source_unittest.cc
index 1fde842..ce994d6 100644
--- a/chrome/browser/ui/webui/theme_source_unittest.cc
+++ b/chrome/browser/ui/webui/theme_source_unittest.cc
@@ -9,7 +9,6 @@
#include "chrome/test/testing_profile.h"
#include "content/browser/browser_thread.h"
#include "grit/theme_resources.h"
-#include "grit/theme_resources_standard.h"
#include "testing/gtest/include/gtest/gtest.h"
// A mock ThemeSource (so we can override SendResponse to get at its data).