summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/info_bubble.cc
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-14 21:29:26 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-14 21:29:26 +0000
commitb7969209a311ca384eceacef7d67743f2ffd792d (patch)
treed64c91438914c09f4389c9edf99ff29f1a8c7dbf /chrome/browser/views/info_bubble.cc
parent0805a9b30d8cf935a572fe093a74f6784c6e4689 (diff)
downloadchromium_src-b7969209a311ca384eceacef7d67743f2ffd792d.zip
chromium_src-b7969209a311ca384eceacef7d67743f2ffd792d.tar.gz
chromium_src-b7969209a311ca384eceacef7d67743f2ffd792d.tar.bz2
Removing the app launcher button in the ChromeOS browser and making the app launcher pinned to the location bar.
BUG=3190 TEST=The app launcher icon on the top-left corner of the browser should be gone. Opening a new tab by pressing the + button or typing CTRL-T should bring the app launcher, it should be located on top of the location bar. Review URL: http://codereview.chromium.org/2060004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/info_bubble.cc')
-rw-r--r--chrome/browser/views/info_bubble.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index d1414040..d184c46 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -199,9 +199,9 @@ BorderWidget::BorderWidget() : border_contents_(NULL) {
}
-void BorderWidget::Init(HWND owner) {
+void BorderWidget::Init(BorderContents* border_contents, HWND owner) {
DCHECK(!border_contents_);
- border_contents_ = CreateBorderContents();
+ border_contents_ = border_contents;
border_contents_->Init();
WidgetWin::Init(GetAncestor(owner, GA_ROOT), gfx::Rect());
SetContentsView(border_contents_);
@@ -236,10 +236,6 @@ gfx::Rect BorderWidget::SizeAndGetBounds(
return contents_bounds;
}
-BorderContents* BorderWidget::CreateBorderContents() {
- return new BorderContents();
-}
-
LRESULT BorderWidget::OnMouseActivate(HWND window,
UINT hit_test,
UINT mouse_message) {
@@ -325,8 +321,8 @@ void InfoBubble::Init(views::Widget* parent,
#if defined(OS_WIN)
DCHECK(!border_.get());
- border_.reset(CreateBorderWidget());
- border_->Init(GetNativeView());
+ border_.reset(new BorderWidget());
+ border_->Init(CreateBorderContents(), GetNativeView());
// Initialize and position the border window.
window_bounds = border_->SizeAndGetBounds(position_relative_to,
@@ -341,7 +337,7 @@ void InfoBubble::Init(views::Widget* parent,
views::Background::CreateSolidBackground(kBackgroundColor));
#else
// Create a view to paint the border and background.
- border_contents_ = new BorderContents;
+ border_contents_ = CreateBorderContents();
border_contents_->Init();
gfx::Rect contents_bounds;
border_contents_->SizeAndGetBounds(position_relative_to,
@@ -375,11 +371,9 @@ void InfoBubble::Init(views::Widget* parent,
#endif
}
-#if defined(OS_WIN)
-BorderWidget* InfoBubble::CreateBorderWidget() {
- return new BorderWidget;
+BorderContents* InfoBubble::CreateBorderContents() {
+ return new BorderContents();
}
-#endif
void InfoBubble::SizeToContents() {
gfx::Rect window_bounds;