summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 15:29:49 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-03 15:29:49 +0000
commit87d4cd49f1d8551578ab4c3d04fd21e31d83e379 (patch)
tree817d39cc2181273fe3a4cf262a3ed222fc4eed36
parent6454c0b420f2ed03cf0acf51404fb945a870afd9 (diff)
downloadchromium_src-87d4cd49f1d8551578ab4c3d04fd21e31d83e379.zip
chromium_src-87d4cd49f1d8551578ab4c3d04fd21e31d83e379.tar.gz
chromium_src-87d4cd49f1d8551578ab4c3d04fd21e31d83e379.tar.bz2
Remove InfoBubbleView.bubbleType as it was deprecated and all bubbles are now white.
BUG=none TEST=no change Review URL: http://codereview.chromium.org/5558003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68172 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/cocoa/base_bubble_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm1
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/first_run_bubble_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/info_bubble_view.h11
-rw-r--r--chrome/browser/ui/cocoa/info_bubble_view.mm35
6 files changed, 2 insertions, 49 deletions
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller.mm b/chrome/browser/ui/cocoa/base_bubble_controller.mm
index 1ebef4c..3c1e9d2 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -120,7 +120,6 @@ class Bridge : public NotificationObserver {
base_bridge_.reset(new BaseBubbleControllerInternal::Bridge(self));
- [bubble_ setBubbleType:info_bubble::kWhiteInfoBubble];
[bubble_ setArrowLocation:info_bubble::kTopRight];
}
diff --git a/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm
index 9e36292..26c3827 100644
--- a/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/content_setting_bubble_cocoa.mm
@@ -424,7 +424,6 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
- (void)awakeFromNib {
[super awakeFromNib];
- [[self bubble] setBubbleType:info_bubble::kWhiteInfoBubble];
[[self bubble] setArrowLocation:info_bubble::kTopRight];
// Adapt window size to bottom buttons. Do this before all other layouting.
diff --git a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
index 86516ba..36192c2 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_popup_controller.mm
@@ -96,7 +96,6 @@ class DevtoolsNotificationBridge : public NotificationObserver {
if (!view.get())
return nil;
[view setArrowLocation:arrowLocation];
- [view setBubbleType:info_bubble::kWhiteInfoBubble];
host->view()->set_is_toolstrip(NO);
diff --git a/chrome/browser/ui/cocoa/first_run_bubble_controller.mm b/chrome/browser/ui/cocoa/first_run_bubble_controller.mm
index a61239a..d4fa202 100644
--- a/chrome/browser/ui/cocoa/first_run_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/first_run_bubble_controller.mm
@@ -50,8 +50,6 @@
}
- (void)awakeFromNib {
- [[self bubble] setBubbleType:info_bubble::kWhiteInfoBubble];
-
DCHECK(header_);
[header_ setStringValue:cocoa_l10n_util::ReplaceNSStringPlaceholders(
[header_ stringValue], GetDefaultSearchEngineName(profile_), NULL)];
diff --git a/chrome/browser/ui/cocoa/info_bubble_view.h b/chrome/browser/ui/cocoa/info_bubble_view.h
index 974581b..e1238d2 100644
--- a/chrome/browser/ui/cocoa/info_bubble_view.h
+++ b/chrome/browser/ui/cocoa/info_bubble_view.h
@@ -20,12 +20,6 @@ enum BubbleArrowLocation {
kTopRight,
};
-enum InfoBubbleType {
- kWhiteInfoBubble,
- // Gradient bubbles are deprecated, per alcor@google.com. Please use white.
- kGradientInfoBubble
-};
-
} // namespace info_bubble
// Content view for a bubble with an arrow showing arbitrary content.
@@ -33,14 +27,9 @@ enum InfoBubbleType {
@interface InfoBubbleView : NSView {
@private
info_bubble::BubbleArrowLocation arrowLocation_;
-
- // The type simply is used to determine what sort of background it should
- // draw.
- info_bubble::InfoBubbleType bubbleType_;
}
@property (assign, nonatomic) info_bubble::BubbleArrowLocation arrowLocation;
-@property (assign, nonatomic) info_bubble::InfoBubbleType bubbleType;
// Returns the point location in view coordinates of the tip of the arrow.
- (NSPoint)arrowTip;
diff --git a/chrome/browser/ui/cocoa/info_bubble_view.mm b/chrome/browser/ui/cocoa/info_bubble_view.mm
index 8033cb5..209857a 100644
--- a/chrome/browser/ui/cocoa/info_bubble_view.mm
+++ b/chrome/browser/ui/cocoa/info_bubble_view.mm
@@ -6,19 +6,15 @@
#include "base/logging.h"
#include "base/scoped_nsobject.h"
-#import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
@implementation InfoBubbleView
@synthesize arrowLocation = arrowLocation_;
-@synthesize bubbleType = bubbleType_;
- (id)initWithFrame:(NSRect)frameRect {
if ((self = [super initWithFrame:frameRect])) {
arrowLocation_ = info_bubble::kTopLeft;
- bubbleType_ = info_bubble::kWhiteInfoBubble;
}
-
return self;
}
@@ -58,35 +54,8 @@
[bezier lineToPoint:NSMakePoint(arrowStart.x + info_bubble::kBubbleArrowWidth,
arrowStart.y)];
[bezier closePath];
-
- // Then fill the inside depending on the type of bubble.
- if (bubbleType_ == info_bubble::kGradientInfoBubble) {
- NSColor* base_color = [NSColor colorWithCalibratedWhite:0.5 alpha:1.0];
- NSColor* startColor =
- [base_color gtm_colorAdjustedFor:GTMColorationLightHighlight
- faded:YES];
- NSColor* midColor =
- [base_color gtm_colorAdjustedFor:GTMColorationLightMidtone
- faded:YES];
- NSColor* endColor =
- [base_color gtm_colorAdjustedFor:GTMColorationLightShadow
- faded:YES];
- NSColor* glowColor =
- [base_color gtm_colorAdjustedFor:GTMColorationLightPenumbra
- faded:YES];
-
- scoped_nsobject<NSGradient> gradient(
- [[NSGradient alloc] initWithColorsAndLocations:startColor, 0.0,
- midColor, 0.25,
- endColor, 0.5,
- glowColor, 0.75,
- nil]);
-
- [gradient.get() drawInBezierPath:bezier angle:0.0];
- } else if (bubbleType_ == info_bubble::kWhiteInfoBubble) {
- [[NSColor whiteColor] set];
- [bezier fill];
- }
+ [[NSColor whiteColor] set];
+ [bezier fill];
}
- (NSPoint)arrowTip {