summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-07 19:53:58 +0000
committerlaforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-07 19:53:58 +0000
commit668b29f87b1d17f250d5cdeb1a8e903b7aa5b9a6 (patch)
tree19d5e885370ba0c5958cdf02a3986d462762a4e8
parentd5a64b0d978c8e42f89c5b36601201e41beb187a (diff)
downloadchromium_src-668b29f87b1d17f250d5cdeb1a8e903b7aa5b9a6.zip
chromium_src-668b29f87b1d17f250d5cdeb1a8e903b7aa5b9a6.tar.gz
chromium_src-668b29f87b1d17f250d5cdeb1a8e903b7aa5b9a6.tar.bz2
Revert 108880 - Merge 108537 - Align avatar bubble with edge of anchor control
Currently when showing the avatar bubble the tip of the bubble points to the middle of the anchor control. This can look weird so I'm changing it to be aligned with the edge of the anchor control. BUG=98884 TEST= Review URL: http://codereview.chromium.org/8493011 TBR=sail@chromium.org Review URL: http://codereview.chromium.org/8467026 git-svn-id: svn://svn.chromium.org/chrome/branches/912/src@108896 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/message_bubble.cc2
-rw-r--r--chrome/browser/chromeos/status/caps_lock_menu_button.cc12
-rw-r--r--chrome/browser/external_tab_container_win.cc1
-rw-r--r--chrome/browser/resources/ntp4/new_tab.css2
-rw-r--r--chrome/browser/speech/speech_input_bubble_views.cc5
-rw-r--r--chrome/browser/ui/views/avatar_menu_button.cc3
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc3
-rw-r--r--chrome/browser/ui/views/bubble/border_contents.cc5
-rw-r--r--chrome/browser/ui/views/bubble/border_contents.h3
-rw-r--r--chrome/browser/ui/views/bubble/bubble.cc9
-rw-r--r--chrome/browser/ui/views/bubble/bubble.h3
-rw-r--r--chrome/browser/ui/views/extensions/extension_installed_bubble.cc4
-rw-r--r--chrome/browser/ui/views/first_run_bubble.cc3
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc9
-rw-r--r--chrome/browser/ui/views/global_error_bubble_view.cc5
-rw-r--r--chrome/browser/ui/views/location_bar/content_setting_image_view.cc1
-rw-r--r--chrome/browser/ui/views/page_info_bubble_view.cc1
-rw-r--r--chrome/browser/ui/views/pinned_contents_info_bubble.cc1
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc1
-rw-r--r--chrome/browser/ui/views/web_intent_picker_view.cc4
-rw-r--r--views/bubble/bubble_border.cc14
-rw-r--r--views/bubble/bubble_border.h14
22 files changed, 26 insertions, 79 deletions
diff --git a/chrome/browser/chromeos/login/message_bubble.cc b/chrome/browser/chromeos/login/message_bubble.cc
index 3304705..074494ff 100644
--- a/chrome/browser/chromeos/login/message_bubble.cc
+++ b/chrome/browser/chromeos/login/message_bubble.cc
@@ -150,7 +150,6 @@ MessageBubble* MessageBubble::ShowWithLinks(
views::Widget::InitParams::TYPE_POPUP, parent, image, text, links,
true, delegate);
bubble->InitBubble(parent, position_relative_to, arrow_location,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
bubble->text_->parent(), delegate);
return bubble;
}
@@ -172,7 +171,6 @@ MessageBubble* MessageBubble::ShowNoGrab(
views::Widget::InitParams::TYPE_CONTROL, parent, image, text, links,
false, delegate);
bubble->InitBubble(parent, position_relative_to, arrow_location,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
bubble->text_->parent(), delegate);
return bubble;
}
diff --git a/chrome/browser/chromeos/status/caps_lock_menu_button.cc b/chrome/browser/chromeos/status/caps_lock_menu_button.cc
index 78e4083..94ab8d1 100644
--- a/chrome/browser/chromeos/status/caps_lock_menu_button.cc
+++ b/chrome/browser/chromeos/status/caps_lock_menu_button.cc
@@ -316,12 +316,12 @@ void CapsLockMenuButton::CreateAndShowBubble() {
gfx::Rect button_bounds = GetScreenBounds();
button_bounds.set_y(button_bounds.y() + 1); // See login/message_bubble.cc.
- bubble_ = Bubble::ShowFocusless(GetWidget(), button_bounds,
- views::BubbleBorder::TOP_RIGHT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
- new CapsLockMenuButton::StatusView(this),
- NULL /* no delegate */,
- true /* show_while_screen_is_locked */);
+ bubble_ = Bubble::ShowFocusless(GetWidget(),
+ button_bounds,
+ views::BubbleBorder::TOP_RIGHT,
+ new CapsLockMenuButton::StatusView(this),
+ NULL /* no delegate */,
+ true /* show_while_screen_is_locked */);
}
void CapsLockMenuButton::HideBubble() {
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index b750366..3f58d2a 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -601,7 +601,6 @@ void ExternalTabContainer::ShowPageInfo(Profile* profile,
ssl, show_history);
Bubble* bubble = Bubble::Show(GetWidget(), bounds,
views::BubbleBorder::TOP_LEFT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
page_info_bubble, page_info_bubble);
page_info_bubble->set_bubble(bubble);
}
diff --git a/chrome/browser/resources/ntp4/new_tab.css b/chrome/browser/resources/ntp4/new_tab.css
index 643cb76..ac12e7f 100644
--- a/chrome/browser/resources/ntp4/new_tab.css
+++ b/chrome/browser/resources/ntp4/new_tab.css
@@ -177,10 +177,8 @@ html[dir='rtl'] #attribution {
cursor: pointer;
font-size: 13px;
/* Leave room for the scrollbar. */
- margin-left: 13px;
margin-right: 13px;
margin-top: 5px;
- padding: 0;
position: fixed;
right: 0;
text-align: right;
diff --git a/chrome/browser/speech/speech_input_bubble_views.cc b/chrome/browser/speech/speech_input_bubble_views.cc
index 820979b..d417c99 100644
--- a/chrome/browser/speech/speech_input_bubble_views.cc
+++ b/chrome/browser/speech/speech_input_bubble_views.cc
@@ -366,9 +366,8 @@ void SpeechInputBubbleImpl::Show() {
}
bubble_ = Bubble::Show(toplevel_widget,
target_rect,
- views::BubbleBorder::TOP_LEFT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
- bubble_content_, this);
+ views::BubbleBorder::TOP_LEFT, bubble_content_,
+ this);
// We don't want fade outs when closing because it makes speech recognition
// appear slower than it is. Also setting it to false allows |Close| to
// destroy the bubble immediately instead of waiting for the fade animation
diff --git a/chrome/browser/ui/views/avatar_menu_button.cc b/chrome/browser/ui/views/avatar_menu_button.cc
index 6640ca6..36a899d 100644
--- a/chrome/browser/ui/views/avatar_menu_button.cc
+++ b/chrome/browser/ui/views/avatar_menu_button.cc
@@ -158,8 +158,7 @@ void AvatarMenuButton::ShowAvatarBubble() {
AvatarMenuBubbleView* bubble_view = new AvatarMenuBubbleView(browser_);
// Bubble::Show() takes ownership of the view.
bubble_ = Bubble::Show(browser_view->GetWidget(), bounds,
- views::BubbleBorder::TOP_LEFT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bubble_view, bubble_view);
+ views::BubbleBorder::TOP_LEFT, bubble_view, bubble_view);
bubble_->AddObserver(this);
}
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index d2ba8b7..b7646cd 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -91,8 +91,7 @@ void BookmarkBubbleView::Show(views::Widget* parent,
bookmark_bubble_ = new BookmarkBubbleView(delegate, profile, url,
newly_bookmarked);
Bubble* bubble = Bubble::Show(
- parent, bounds, views::BubbleBorder::TOP_RIGHT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bookmark_bubble_,
+ parent, bounds, views::BubbleBorder::TOP_RIGHT, bookmark_bubble_,
bookmark_bubble_);
// |bubble_| can be set to NULL in BubbleClosing when we close the bubble
// asynchronously. However, that can happen during the Show call above if the
diff --git a/chrome/browser/ui/views/bubble/border_contents.cc b/chrome/browser/ui/views/bubble/border_contents.cc
index e148e32..3503b19 100644
--- a/chrome/browser/ui/views/bubble/border_contents.cc
+++ b/chrome/browser/ui/views/bubble/border_contents.cc
@@ -38,11 +38,6 @@ void BorderContents::SetBackgroundColor(SkColor color) {
bubble_border_->set_background_color(color);
}
-void BorderContents::SetAlignment(
- views::BubbleBorder::BubbleAlignment alignment) {
- bubble_border_->set_alignment(alignment);
-}
-
void BorderContents::SizeAndGetBounds(
const gfx::Rect& position_relative_to,
views::BubbleBorder::ArrowLocation arrow_location,
diff --git a/chrome/browser/ui/views/bubble/border_contents.h b/chrome/browser/ui/views/bubble/border_contents.h
index 5504bc0..d61b847 100644
--- a/chrome/browser/ui/views/bubble/border_contents.h
+++ b/chrome/browser/ui/views/bubble/border_contents.h
@@ -22,9 +22,6 @@ class BorderContents : public views::View {
// Sets the background color.
void SetBackgroundColor(SkColor color);
- // Sets the bubble alignment.
- void SetAlignment(views::BubbleBorder::BubbleAlignment alignment);
-
// Given the size of the contents and the rect to point at, returns the bounds
// of both the border and the contents inside the bubble.
// |arrow_location| specifies the preferred location for the arrow
diff --git a/chrome/browser/ui/views/bubble/bubble.cc b/chrome/browser/ui/views/bubble/bubble.cc
index 4109295..04c3c390 100644
--- a/chrome/browser/ui/views/bubble/bubble.cc
+++ b/chrome/browser/ui/views/bubble/bubble.cc
@@ -51,11 +51,10 @@ string16 BubbleDelegate::GetAccessibleName() {
Bubble* Bubble::Show(views::Widget* parent,
const gfx::Rect& position_relative_to,
views::BubbleBorder::ArrowLocation arrow_location,
- views::BubbleBorder::BubbleAlignment alignment,
views::View* contents,
BubbleDelegate* delegate) {
Bubble* bubble = new Bubble;
- bubble->InitBubble(parent, position_relative_to, arrow_location, alignment,
+ bubble->InitBubble(parent, position_relative_to, arrow_location,
contents, delegate);
// Register the Escape accelerator for closing.
@@ -73,13 +72,12 @@ Bubble* Bubble::ShowFocusless(
views::Widget* parent,
const gfx::Rect& position_relative_to,
views::BubbleBorder::ArrowLocation arrow_location,
- views::BubbleBorder::BubbleAlignment alignment,
views::View* contents,
BubbleDelegate* delegate,
bool show_while_screen_is_locked) {
Bubble* bubble = new Bubble(views::Widget::InitParams::TYPE_POPUP,
show_while_screen_is_locked);
- bubble->InitBubble(parent, position_relative_to, arrow_location, alignment,
+ bubble->InitBubble(parent, position_relative_to, arrow_location,
contents, delegate);
return bubble;
}
@@ -193,7 +191,6 @@ Bubble::~Bubble() {
void Bubble::InitBubble(views::Widget* parent,
const gfx::Rect& position_relative_to,
views::BubbleBorder::ArrowLocation arrow_location,
- views::BubbleBorder::BubbleAlignment alignment,
views::View* contents,
BubbleDelegate* delegate) {
delegate_ = delegate;
@@ -223,7 +220,6 @@ void Bubble::InitBubble(views::Widget* parent,
border_->InitBorderWidgetWin(CreateBorderContents(), parent->GetNativeView());
border_->border_contents()->SetBackgroundColor(kBackgroundColor);
- border_->border_contents()->SetAlignment(alignment);
// We make the BorderWidgetWin the owner of the Bubble HWND, so that the
// latter is displayed on top of the former.
@@ -292,7 +288,6 @@ void Bubble::InitBubble(views::Widget* parent,
border_contents_ = CreateBorderContents();
border_contents_->Init();
border_contents_->SetBackgroundColor(kBackgroundColor);
- border_contents_->SetAlignment(alignment);
gfx::Rect contents_bounds;
border_contents_->SizeAndGetBounds(position_relative_to,
arrow_location, false, contents->GetPreferredSize(),
diff --git a/chrome/browser/ui/views/bubble/bubble.h b/chrome/browser/ui/views/bubble/bubble.h
index 2ade620..404501c 100644
--- a/chrome/browser/ui/views/bubble/bubble.h
+++ b/chrome/browser/ui/views/bubble/bubble.h
@@ -112,7 +112,6 @@ class Bubble
static Bubble* Show(views::Widget* parent,
const gfx::Rect& position_relative_to,
views::BubbleBorder::ArrowLocation arrow_location,
- views::BubbleBorder::BubbleAlignment alignment,
views::View* contents,
BubbleDelegate* delegate);
@@ -127,7 +126,6 @@ class Bubble
views::Widget* parent,
const gfx::Rect& position_relative_to,
views::BubbleBorder::ArrowLocation arrow_location,
- views::BubbleBorder::BubbleAlignment alignment,
views::View* contents,
BubbleDelegate* delegate,
bool show_while_screen_is_locked);
@@ -183,7 +181,6 @@ class Bubble
virtual void InitBubble(views::Widget* parent,
const gfx::Rect& position_relative_to,
views::BubbleBorder::ArrowLocation arrow_location,
- views::BubbleBorder::BubbleAlignment alignment,
views::View* contents,
BubbleDelegate* delegate);
diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
index 651c96f..c7d1a3a 100644
--- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc
@@ -408,9 +408,7 @@ void ExtensionInstalledBubble::ShowInternal() {
bubble_content_ = new InstalledBubbleContent(
browser_, extension_, type_, &icon_);
Bubble* bubble = Bubble::Show(browser_view->GetWidget(), bounds,
- arrow_location,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
- bubble_content_, this);
+ arrow_location, bubble_content_, this);
bubble_content_->set_bubble(bubble);
}
diff --git a/chrome/browser/ui/views/first_run_bubble.cc b/chrome/browser/ui/views/first_run_bubble.cc
index ea925db..349257a 100644
--- a/chrome/browser/ui/views/first_run_bubble.cc
+++ b/chrome/browser/ui/views/first_run_bubble.cc
@@ -510,8 +510,7 @@ FirstRunBubble* FirstRunBubble::Show(
}
bubble->set_view(view);
bubble->InitBubble(
- parent, position_relative_to, arrow_location,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, view, bubble);
+ parent, position_relative_to, arrow_location, view, bubble);
bubble->GetWidget()->GetFocusManager()->AddFocusChangeListener(view);
view->BubbleShown();
return bubble;
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index db38c3d..1d38db8 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -2603,14 +2603,15 @@ BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
void BrowserView::ShowAvatarBubble(TabContents* tab_contents,
const gfx::Rect& rect) {
- gfx::Point origin(rect.origin());
+ gfx::Point origin(rect.right(), rect.bottom());
views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin);
- gfx::Rect bounds(origin, rect.size());
+ gfx::Rect bounds;
+ bounds.set_origin(origin);
AvatarMenuBubbleView* bubble_view = new AvatarMenuBubbleView(browser_.get());
// Bubble::Show() takes ownership of the view.
- Bubble::Show(this->GetWidget(), bounds, views::BubbleBorder::TOP_RIGHT,
- views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE,
+ Bubble::Show(this->GetWidget(), bounds,
+ views::BubbleBorder::TOP_RIGHT,
bubble_view, bubble_view);
}
diff --git a/chrome/browser/ui/views/global_error_bubble_view.cc b/chrome/browser/ui/views/global_error_bubble_view.cc
index acfa705..76a6501 100644
--- a/chrome/browser/ui/views/global_error_bubble_view.cc
+++ b/chrome/browser/ui/views/global_error_bubble_view.cc
@@ -172,8 +172,7 @@ void GlobalError::ShowBubbleView(Browser* browser, GlobalError* error) {
new GlobalErrorBubbleView(browser, error);
// Bubble::Show() takes ownership of the view.
Bubble* bubble = Bubble::Show(
- browser_view->GetWidget(), bounds, views::BubbleBorder::TOP_RIGHT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bubble_view,
- bubble_view);
+ browser_view->GetWidget(), bounds,
+ views::BubbleBorder::TOP_RIGHT, bubble_view, bubble_view);
bubble_view->set_bubble(bubble);
}
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index d6cebb2..11c1835 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -144,7 +144,6 @@ void ContentSettingImageView::OnMouseReleased(const views::MouseEvent& event) {
profile, tab_contents->tab_contents());
bubble_ = Bubble::Show(GetWidget(), screen_bounds,
views::BubbleBorder::TOP_RIGHT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
bubble_contents, this);
bubble_contents->set_bubble(bubble_);
}
diff --git a/chrome/browser/ui/views/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info_bubble_view.cc
index 9a6dbed..16033d9 100644
--- a/chrome/browser/ui/views/page_info_bubble_view.cc
+++ b/chrome/browser/ui/views/page_info_bubble_view.cc
@@ -502,7 +502,6 @@ void ShowPageInfoBubble(BrowserView* browser_view,
Bubble* bubble =
Bubble::Show(browser_view->GetWidget(), bounds,
views::BubbleBorder::TOP_LEFT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
page_info_bubble, page_info_bubble);
page_info_bubble->set_bubble(bubble);
}
diff --git a/chrome/browser/ui/views/pinned_contents_info_bubble.cc b/chrome/browser/ui/views/pinned_contents_info_bubble.cc
index 3566536..f1b712b 100644
--- a/chrome/browser/ui/views/pinned_contents_info_bubble.cc
+++ b/chrome/browser/ui/views/pinned_contents_info_bubble.cc
@@ -44,7 +44,6 @@ PinnedContentsInfoBubble* PinnedContentsInfoBubble::Show(
PinnedContentsInfoBubble* bubble =
new PinnedContentsInfoBubble(bubble_anchor);
bubble->InitBubble(parent, position_relative_to, arrow_location,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
contents, delegate);
return bubble;
}
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 84ead0e..207d093 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -731,7 +731,6 @@ void ToolbarView::ShowCriticalNotification() {
Bubble* bubble = Bubble::Show(GetWidget(),
gfx::Rect(screen_loc, app_menu_->size()),
views::BubbleBorder::TOP_RIGHT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
critical_notification_bubble,
critical_notification_bubble);
bubble->set_close_on_deactivate(false);
diff --git a/chrome/browser/ui/views/web_intent_picker_view.cc b/chrome/browser/ui/views/web_intent_picker_view.cc
index 387f77b..347d34a 100644
--- a/chrome/browser/ui/views/web_intent_picker_view.cc
+++ b/chrome/browser/ui/views/web_intent_picker_view.cc
@@ -167,9 +167,7 @@ WebIntentPickerView::WebIntentPickerView(Browser* browser,
bounds.set_width(kIconHorizontalOffset);
bubble_ = Bubble::Show(browser_view->GetWidget(), bounds,
- views::BubbleBorder::TOP_LEFT,
- views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR,
- this, this);
+ views::BubbleBorder::TOP_LEFT, this, this);
}
WebIntentPickerView::~WebIntentPickerView() {
diff --git a/views/bubble/bubble_border.cc b/views/bubble/bubble_border.cc
index 7982fb1..871e669 100644
--- a/views/bubble/bubble_border.cc
+++ b/views/bubble/bubble_border.cc
@@ -60,15 +60,12 @@ gfx::Rect BubbleBorder::GetBounds(const gfx::Rect& position_relative_to,
switch (arrow_location_) {
case TOP_LEFT:
case BOTTOM_LEFT:
- x += alignment_ == ALIGN_ARROW_TO_MID_ANCHOR ? w / 2 - arrow_offset :
- -kArrowOverlap;
+ x += w / 2 - arrow_offset;
break;
case TOP_RIGHT:
case BOTTOM_RIGHT:
- x += alignment_ == ALIGN_ARROW_TO_MID_ANCHOR ?
- w / 2 + arrow_offset - border_size.width() + 1 :
- w - border_size.width() + kArrowOverlap;
+ x += w / 2 + arrow_offset - border_size.width() + 1;
break;
case LEFT_TOP:
@@ -101,15 +98,12 @@ gfx::Rect BubbleBorder::GetBounds(const gfx::Rect& position_relative_to,
case LEFT_TOP:
case RIGHT_TOP:
- y += alignment_ == ALIGN_ARROW_TO_MID_ANCHOR ? h / 2 - arrow_offset :
- -kArrowOverlap;
+ y += h / 2 - arrow_offset;
break;
case LEFT_BOTTOM:
case RIGHT_BOTTOM:
- y += alignment_ == ALIGN_ARROW_TO_MID_ANCHOR ?
- h / 2 + arrow_offset - border_size.height() + 1 :
- h - border_size.height() + kArrowOverlap;
+ y += h / 2 + arrow_offset - border_size.height() + 1;
break;
case NONE:
diff --git a/views/bubble/bubble_border.h b/views/bubble/bubble_border.h
index 2331680..59ec8b7 100644
--- a/views/bubble/bubble_border.h
+++ b/views/bubble/bubble_border.h
@@ -35,18 +35,9 @@ class VIEWS_EXPORT BubbleBorder : public views::Border {
FLOAT = 9 // No arrow. Centered over the supplied rect.
};
- // The position of the bubble in relation to the anchor.
- enum BubbleAlignment {
- // The tip of the arrow points to the middle of the anchor.
- ALIGN_ARROW_TO_MID_ANCHOR,
- // The edge nearest to the arrow is lined up with the edge of the anchor.
- ALIGN_EDGE_TO_ANCHOR_EDGE
- };
-
explicit BubbleBorder(ArrowLocation arrow_location)
: override_arrow_offset_(0),
arrow_location_(arrow_location),
- alignment_(ALIGN_ARROW_TO_MID_ANCHOR),
background_color_(SK_ColorWHITE) {
InitClass();
}
@@ -66,10 +57,6 @@ class VIEWS_EXPORT BubbleBorder : public views::Border {
}
ArrowLocation arrow_location() const { return arrow_location_; }
- // Sets the alignment.
- void set_alignment(BubbleAlignment alignment) { alignment_ = alignment; }
- BubbleAlignment alignment() const { return alignment_; }
-
static ArrowLocation horizontal_mirror(ArrowLocation loc) {
return loc >= NONE ? loc : static_cast<ArrowLocation>(loc ^ 1);
}
@@ -164,7 +151,6 @@ class VIEWS_EXPORT BubbleBorder : public views::Border {
int override_arrow_offset_;
ArrowLocation arrow_location_;
- BubbleAlignment alignment_;
SkColor background_color_;
DISALLOW_COPY_AND_ASSIGN(BubbleBorder);