summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authortapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-04 01:47:32 +0000
committertapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-04 01:47:32 +0000
commit2ef1827ba2134a500ebe1749c3fdaa2e2291bb6e (patch)
treed92453293ef903c7ef9b6bef616e5befd85e25c5 /chrome
parent29b133568d4439e0ab64d26d23eca33ef1b24b2a (diff)
downloadchromium_src-2ef1827ba2134a500ebe1749c3fdaa2e2291bb6e.zip
chromium_src-2ef1827ba2134a500ebe1749c3fdaa2e2291bb6e.tar.gz
chromium_src-2ef1827ba2134a500ebe1749c3fdaa2e2291bb6e.tar.bz2
Move HyperlinkButtonCell to /ui/base/cocoa/controls.
Allows Cocoa UI code outside of chrome/browser to use it. This is a precursor to http://crrev.com/18326006 BUG=138633 TEST=No functional changes. Review URL: https://chromiumcodereview.appspot.com/18355002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm2
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm1
-rw-r--r--chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm1
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/hyperlink_button_cell.h37
-rw-r--r--chrome/browser/ui/cocoa/hyperlink_button_cell.mm152
-rw-r--r--chrome/browser/ui/cocoa/hyperlink_button_cell_unittest.mm111
-rw-r--r--chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm1
-rw-r--r--chrome/browser/ui/cocoa/website_settings_bubble_controller.mm2
-rw-r--r--chrome/chrome_browser_ui.gypi2
-rw-r--r--chrome/chrome_nibs.gyp4
-rw-r--r--chrome/chrome_tests_unit.gypi1
17 files changed, 10 insertions, 316 deletions
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm
index 35111d2..ff07b74 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser.mm
@@ -9,10 +9,10 @@
#include "chrome/browser/ui/chrome_style.h"
#include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
#import "chrome/browser/ui/cocoa/autofill/down_arrow_popup_menu_cell.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#import "chrome/browser/ui/cocoa/menu_button.h"
#include "grit/ui_resources.h"
#include "skia/ext/skia_utils_mac.h"
+#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/models/menu_model.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm
index d4717cb..5843db4 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_account_chooser_unittest.mm
@@ -8,10 +8,10 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/autofill/mock_autofill_dialog_controller.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#import "chrome/browser/ui/cocoa/menu_button.h"
#include "testing/gtest_mac.h"
#include "testing/platform_test.h"
+#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/models/simple_menu_model.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
index 9989f83..581cac3 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.mm
@@ -13,7 +13,6 @@
#include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
#include "chrome/browser/ui/chrome_style.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_textfield.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#include "skia/ext/skia_utils_mac.h"
namespace {
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm
index e535d41..d573fbb 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_suggestion_container_unittest.mm
@@ -5,7 +5,6 @@
#import "chrome/browser/ui/cocoa/autofill/autofill_suggestion_container.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_textfield.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#include "testing/gtest/include/gtest/gtest.h"
#import "ui/base/test/ui_cocoa_test_helper.h"
diff --git a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
index 26e5ec9..e9baf59 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
@@ -13,13 +13,13 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
#import "ui/base/cocoa/cocoa_event_utils.h"
+#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/l10n/l10n_util_mac.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
diff --git a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm
index 153efc4..05304e8 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller_unittest.mm
@@ -12,10 +12,10 @@
#include "chrome/browser/profiles/avatar_menu_model_observer.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "testing/gtest_mac.h"
+#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/test/cocoa_test_event_utils.h"
class AvatarMenuBubbleControllerTest : public CocoaTest {
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
index 5040e5b..6606e1a 100644
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm
@@ -12,7 +12,6 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/plugins/plugin_finder.h"
#include "chrome/browser/plugins/plugin_metadata.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/l10n_util.h"
#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
@@ -21,6 +20,7 @@
#include "grit/generated_resources.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
+#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/l10n/l10n_util.h"
using content::PluginService;
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm
index 5e5af3c..4e69bdd 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm
@@ -13,12 +13,12 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/extensions/bundle_installer.h"
#import "chrome/browser/ui/chrome_style.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#include "chrome/common/extensions/extension.h"
#include "content/public/browser/page_navigator.h"
#include "grit/generated_resources.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
+#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_mac.h"
#include "ui/gfx/image/image_skia_util_mac.h"
diff --git a/chrome/browser/ui/cocoa/hyperlink_button_cell.h b/chrome/browser/ui/cocoa/hyperlink_button_cell.h
deleted file mode 100644
index 1cdc263..0000000
--- a/chrome/browser/ui/cocoa/hyperlink_button_cell.h
+++ /dev/null
@@ -1,37 +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 <Cocoa/Cocoa.h>
-#include "base/mac/scoped_nsobject.h"
-
-// A HyperlinkButtonCell is used to create an NSButton that looks and acts
-// like a hyperlink. The default styling is to look like blue, underlined text
-// and to have the pointingHand cursor on mouse over.
-//
-// To use in Interface Builder:
-// 1. Drag out an NSButton.
-// 2. Double click on the button so you have the cell component selected.
-// 3. In the Identity panel of the inspector, set the custom class to this.
-// 4. In the Attributes panel, change the Bezel to Square.
-// 5. In the Size panel, set the Height to 16.
-@interface HyperlinkButtonCell : NSButtonCell {
- base::scoped_nsobject<NSColor> textColor_;
- BOOL shouldUnderline_;
- BOOL underlineOnHover_;
- BOOL mouseIsInside_;
-}
-@property(nonatomic, retain) NSColor* textColor;
-@property(nonatomic, assign) BOOL underlineOnHover;
-@property(nonatomic, assign) BOOL shouldUnderline;
-
-+ (NSColor*)defaultTextColor;
-
-// Helper function to create a button with HyperLinkButtonCell as its cell.
-+ (NSButton*)buttonWithString:(NSString*)string;
-
-@end
-
-@interface HyperlinkButtonCell (ExposedForTesting)
-- (NSDictionary*)linkAttributes;
-@end
diff --git a/chrome/browser/ui/cocoa/hyperlink_button_cell.mm b/chrome/browser/ui/cocoa/hyperlink_button_cell.mm
deleted file mode 100644
index 49f316c..0000000
--- a/chrome/browser/ui/cocoa/hyperlink_button_cell.mm
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (c) 2012 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/hyperlink_button_cell.h"
-
-@interface HyperlinkButtonCell ()
-- (void)customizeButtonCell;
-@end
-
-@implementation HyperlinkButtonCell
-
-@dynamic textColor;
-@synthesize underlineOnHover = underlineOnHover_;
-@synthesize shouldUnderline = shouldUnderline_;
-
-+ (NSColor*)defaultTextColor {
- return [NSColor blueColor];
-}
-
-+ (NSButton*)buttonWithString:(NSString*)string {
- NSButton* button = [[[NSButton alloc] initWithFrame:NSZeroRect] autorelease];
- base::scoped_nsobject<HyperlinkButtonCell> cell(
- [[HyperlinkButtonCell alloc] initTextCell:string]);
- [cell setAlignment:NSLeftTextAlignment];
- [button setCell:cell.get()];
- [button setBezelStyle:NSRegularSquareBezelStyle];
- return button;
-}
-
-// Designated initializer.
-- (id)init {
- if ((self = [super init])) {
- [self customizeButtonCell];
- }
- return self;
-}
-
-// Initializer called when the cell is loaded from the NIB.
-- (id)initWithCoder:(NSCoder*)aDecoder {
- if ((self = [super initWithCoder:aDecoder])) {
- [self customizeButtonCell];
- }
- return self;
-}
-
-// Initializer for code-based creation.
-- (id)initTextCell:(NSString*)title {
- if ((self = [super initTextCell:title])) {
- [self customizeButtonCell];
- }
- return self;
-}
-
-// Because an NSButtonCell has multiple initializers, this method performs the
-// common cell customization code.
-- (void)customizeButtonCell {
- [self setBordered:NO];
- [self setTextColor:[HyperlinkButtonCell defaultTextColor]];
- [self setShouldUnderline:YES];
-
- CGFloat fontSize = [NSFont systemFontSizeForControlSize:[self controlSize]];
- NSFont* font = [NSFont controlContentFontOfSize:fontSize];
- [self setFont:font];
-
- // Do not change button appearance when we are pushed.
- [self setHighlightsBy:NSNoCellMask];
-
- // We need to set this so that we can override |-mouseEntered:| and
- // |-mouseExited:| to change the cursor style on hover states.
- [self setShowsBorderOnlyWhileMouseInside:YES];
-}
-
-- (void)setControlSize:(NSControlSize)size {
- [super setControlSize:size];
- [self customizeButtonCell]; // recompute |font|.
-}
-
-// Creates the NSDictionary of attributes for the attributed string.
-- (NSDictionary*)linkAttributes {
- NSUInteger underlineMask = NSNoUnderlineStyle;
- if (shouldUnderline_ &&
- (!underlineOnHover_ || (mouseIsInside_ && [self isEnabled])))
- underlineMask = NSUnderlinePatternSolid | NSUnderlineStyleSingle;
-
- base::scoped_nsobject<NSMutableParagraphStyle> paragraphStyle(
- [[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
- [paragraphStyle setAlignment:[self alignment]];
- [paragraphStyle setLineBreakMode:[self lineBreakMode]];
-
- return [NSDictionary dictionaryWithObjectsAndKeys:
- [self textColor], NSForegroundColorAttributeName,
- [NSNumber numberWithInt:underlineMask], NSUnderlineStyleAttributeName,
- [self font], NSFontAttributeName,
- [NSCursor pointingHandCursor], NSCursorAttributeName,
- paragraphStyle.get(), NSParagraphStyleAttributeName,
- nil
- ];
-}
-
-// Override the drawing for the cell so that the custom style attributes
-// can always be applied and so that ellipses will appear when appropriate.
-- (NSRect)drawTitle:(NSAttributedString*)title
- withFrame:(NSRect)frame
- inView:(NSView*)controlView {
- NSDictionary* linkAttributes = [self linkAttributes];
- NSString* plainTitle = [title string];
- [plainTitle drawWithRect:frame
- options:(NSStringDrawingUsesLineFragmentOrigin |
- NSStringDrawingTruncatesLastVisibleLine)
- attributes:linkAttributes];
- return frame;
-}
-
-// Override the default behavior to draw the border. Instead, change the cursor.
-- (void)mouseEntered:(NSEvent*)event {
- mouseIsInside_ = YES;
- if ([self isEnabled])
- [[NSCursor pointingHandCursor] push];
- else
- [[NSCursor currentCursor] push];
- if (underlineOnHover_)
- [[self controlView] setNeedsDisplay:YES];
-}
-
-- (void)mouseExited:(NSEvent*)event {
- mouseIsInside_ = NO;
- [NSCursor pop];
- if (underlineOnHover_)
- [[self controlView] setNeedsDisplay:YES];
-}
-
-// Setters and getters.
-- (NSColor*)textColor {
- if ([self isEnabled])
- return textColor_.get();
- else
- return [NSColor disabledControlTextColor];
-}
-
-- (void)setTextColor:(NSColor*)color {
- textColor_.reset([color retain]);
-}
-
-// Override so that |-sizeToFit| works better with this type of cell.
-- (NSSize)cellSize {
- NSSize size = [super cellSize];
- size.width += 2;
- return size;
-}
-
-@end
diff --git a/chrome/browser/ui/cocoa/hyperlink_button_cell_unittest.mm b/chrome/browser/ui/cocoa/hyperlink_button_cell_unittest.mm
deleted file mode 100644
index 18abc03..0000000
--- a/chrome/browser/ui/cocoa/hyperlink_button_cell_unittest.mm
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) 2012 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 <Cocoa/Cocoa.h>
-
-#include "base/mac/foundation_util.h"
-#include "base/mac/scoped_nsobject.h"
-#import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "testing/platform_test.h"
-
-class HyperlinkButtonCellTest : public CocoaTest {
- public:
- HyperlinkButtonCellTest() {
- NSRect frame = NSMakeRect(0, 0, 50, 30);
- base::scoped_nsobject<NSButton> view(
- [[NSButton alloc] initWithFrame:frame]);
- view_ = view.get();
- base::scoped_nsobject<HyperlinkButtonCell> cell(
- [[HyperlinkButtonCell alloc] initTextCell:@"Testing"]);
- cell_ = cell.get();
- [view_ setCell:cell_];
- [[test_window() contentView] addSubview:view_];
- }
-
- void TestCellCustomization(HyperlinkButtonCell* cell) {
- EXPECT_FALSE([cell isBordered]);
- EXPECT_EQ(NSNoCellMask, [cell_ highlightsBy]);
- EXPECT_TRUE([cell showsBorderOnlyWhileMouseInside]);
- EXPECT_TRUE([cell textColor]);
- }
-
- protected:
- bool HasUnderlineAttribute(NSDictionary* attributes) {
- NSNumber* number = base::mac::ObjCCastStrict<NSNumber>(
- [attributes objectForKey:NSUnderlineStyleAttributeName]);
- return [number unsignedIntegerValue] != 0;
- }
-
- NSButton* view_;
- HyperlinkButtonCell* cell_;
-};
-
-TEST_VIEW(HyperlinkButtonCellTest, view_)
-
-// Tests the three designated intializers.
-TEST_F(HyperlinkButtonCellTest, Initializers) {
- TestCellCustomization(cell_); // |-initTextFrame:|
- base::scoped_nsobject<HyperlinkButtonCell> cell(
- [[HyperlinkButtonCell alloc] init]);
- TestCellCustomization(cell.get());
-
- // Need to create a dummy archiver to test |-initWithCoder:|.
- NSData* emptyData = [NSKeyedArchiver archivedDataWithRootObject:@""];
- NSCoder* coder =
- [[[NSKeyedUnarchiver alloc] initForReadingWithData:emptyData] autorelease];
- cell.reset([[HyperlinkButtonCell alloc] initWithCoder:coder]);
- TestCellCustomization(cell);
-}
-
-// Test set color.
-TEST_F(HyperlinkButtonCellTest, SetTextColor) {
- NSColor* textColor = [NSColor redColor];
- EXPECT_NE(textColor, [cell_ textColor]);
- [cell_ setTextColor:textColor];
- EXPECT_EQ(textColor, [cell_ textColor]);
-}
-
-// Test mouse events.
-// TODO(rsesek): See if we can synthesize mouse events to more accurately
-// test this.
-TEST_F(HyperlinkButtonCellTest, MouseHover) {
- [[NSCursor disappearingItemCursor] push]; // Set a known state.
- [cell_ mouseEntered:nil];
- EXPECT_EQ([NSCursor pointingHandCursor], [NSCursor currentCursor]);
- [cell_ mouseExited:nil];
- EXPECT_EQ([NSCursor disappearingItemCursor], [NSCursor currentCursor]);
- [NSCursor pop];
-}
-
-// Test mouse events when button is disabled. {
-TEST_F(HyperlinkButtonCellTest, MouseHoverWhenDisabled) {
- [cell_ setEnabled:NO];
-
- [[NSCursor disappearingItemCursor] push]; // Set a known state.
- [cell_ mouseEntered:nil];
- EXPECT_EQ([NSCursor disappearingItemCursor], [NSCursor currentCursor]);
-
- [cell_ mouseExited:nil];
- EXPECT_EQ([NSCursor disappearingItemCursor], [NSCursor currentCursor]);
- [NSCursor pop];
- [NSCursor pop];
-}
-
-// Test underline on hover.
-TEST_F(HyperlinkButtonCellTest, UnderlineOnHover) {
- EXPECT_TRUE(HasUnderlineAttribute([cell_ linkAttributes]));
- [cell_ mouseEntered:nil];
- EXPECT_TRUE(HasUnderlineAttribute([cell_ linkAttributes]));
- [cell_ mouseExited:nil];
- EXPECT_TRUE(HasUnderlineAttribute([cell_ linkAttributes]));
-
- [cell_ setUnderlineOnHover:YES];
- EXPECT_FALSE(HasUnderlineAttribute([cell_ linkAttributes]));
- [cell_ mouseEntered:nil];
- EXPECT_TRUE(HasUnderlineAttribute([cell_ linkAttributes]));
- [cell_ mouseExited:nil];
- EXPECT_FALSE(HasUnderlineAttribute([cell_ linkAttributes]));
-}
diff --git a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm
index 367556b..51087ef 100644
--- a/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm
+++ b/chrome/browser/ui/cocoa/profile_signin_confirmation_view_controller.mm
@@ -16,7 +16,6 @@
#import "chrome/browser/ui/chrome_style.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_control_utils.h"
#import "chrome/browser/ui/cocoa/hover_close_button.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
@@ -26,6 +25,7 @@
#include "grit/generated_resources.h"
#include "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
+#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#include "ui/base/l10n/l10n_util.h"
namespace {
diff --git a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm
index 0662eb8..411ffff 100644
--- a/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm
@@ -6,7 +6,6 @@
#include "base/logging.h"
#include "base/strings/sys_string_conversions.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#import "chrome/browser/ui/cocoa/hyperlink_text_view.h"
#include "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h"
#include "chrome/common/url_constants.h"
diff --git a/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm
index b66584f..6a174c7 100644
--- a/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings_bubble_controller.mm
@@ -14,7 +14,6 @@
#include "chrome/browser/infobars/infobar_service.h"
#import "chrome/browser/ui/browser_dialogs.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
-#import "chrome/browser/ui/cocoa/hyperlink_button_cell.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
@@ -29,6 +28,7 @@
#include "grit/theme_resources.h"
#include "grit/ui_resources.h"
#import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
+#import "ui/base/cocoa/controls/hyperlink_button_cell.h"
#import "ui/base/cocoa/flipped_view.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 15d9e44..c88958b 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -682,8 +682,6 @@
'browser/ui/cocoa/hover_close_button.mm',
'browser/ui/cocoa/hung_renderer_controller.h',
'browser/ui/cocoa/hung_renderer_controller.mm',
- 'browser/ui/cocoa/hyperlink_button_cell.h',
- 'browser/ui/cocoa/hyperlink_button_cell.mm',
'browser/ui/cocoa/hyperlink_text_view.h',
'browser/ui/cocoa/hyperlink_text_view.mm',
'browser/ui/cocoa/image_button_cell.h',
diff --git a/chrome/chrome_nibs.gyp b/chrome/chrome_nibs.gyp
index 1c37840..8949533 100644
--- a/chrome/chrome_nibs.gyp
+++ b/chrome/chrome_nibs.gyp
@@ -41,6 +41,8 @@
'../third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.mm',
'../ui/base/cocoa/base_view.h',
'../ui/base/cocoa/base_view.mm',
+ '../ui/base/cocoa/controls/hyperlink_button_cell.h',
+ '../ui/base/cocoa/controls/hyperlink_button_cell.mm',
'../ui/base/cocoa/hover_button.h',
'../ui/base/cocoa/hover_button.mm',
'../ui/base/cocoa/hover_image_button.h',
@@ -161,8 +163,6 @@
'browser/ui/cocoa/hover_close_button.mm',
'browser/ui/cocoa/hung_renderer_controller.h',
'browser/ui/cocoa/hung_renderer_controller.mm',
- 'browser/ui/cocoa/hyperlink_button_cell.h',
- 'browser/ui/cocoa/hyperlink_button_cell.mm',
'browser/ui/cocoa/image_button_cell.h',
'browser/ui/cocoa/image_button_cell.mm',
'browser/ui/cocoa/info_bubble_view.h',
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index 2c981c4..057cef5 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -1442,7 +1442,6 @@
'browser/ui/cocoa/history_overlay_controller_unittest.mm',
'browser/ui/cocoa/hover_close_button_unittest.mm',
'browser/ui/cocoa/hung_renderer_controller_unittest.mm',
- 'browser/ui/cocoa/hyperlink_button_cell_unittest.mm',
'browser/ui/cocoa/hyperlink_text_view_unittest.mm',
'browser/ui/cocoa/image_button_cell_unittest.mm',
'browser/ui/cocoa/info_bubble_view_unittest.mm',