summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/toolbar_view.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 17:59:18 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 17:59:18 +0000
commit28b180310c12025dffd454c3a5b1a2c409ac9509 (patch)
tree5294e512c67a03ec89c32098114e6ba880b84446 /chrome/browser/views/toolbar_view.cc
parent224c0ad4d0d66825b957812a06c0e65d8d811ea7 (diff)
downloadchromium_src-28b180310c12025dffd454c3a5b1a2c409ac9509.zip
chromium_src-28b180310c12025dffd454c3a5b1a2c409ac9509.tar.gz
chromium_src-28b180310c12025dffd454c3a5b1a2c409ac9509.tar.bz2
Makes the toolbar visible for apps again. Here's the set of patches I
reverted: 49016, 47119, 47177, 46930, 46775, and the UI changes for 45566. If you see anything missing, please let me know. Also, there are some grd strings no longer necessary. I'll nuke those separately. BUG=49013 TEST=none Review URL: http://codereview.chromium.org/2888020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/toolbar_view.cc')
-rw-r--r--chrome/browser/views/toolbar_view.cc29
1 files changed, 2 insertions, 27 deletions
diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc
index 1b7ff8b..8ece2c1 100644
--- a/chrome/browser/views/toolbar_view.cc
+++ b/chrome/browser/views/toolbar_view.cc
@@ -58,9 +58,6 @@ static const int kPopupTopSpacingNonGlass = 3;
static const int kPopupBottomSpacingNonGlass = 2;
static const int kPopupBottomSpacingGlass = 1;
-// The height of the toolbar when it is in collapsed mode.
-const int kCollapsedToolbarHeight = 7;
-
static SkBitmap* kPopupBackgroundEdge = NULL;
////////////////////////////////////////////////////////////////////////////////
@@ -79,8 +76,7 @@ ToolbarView::ToolbarView(Browser* browser)
browser_(browser),
profiles_menu_contents_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
- destroyed_flag_(NULL),
- collapsed_(false) {
+ destroyed_flag_(NULL) {
SetID(VIEW_ID_TOOLBAR);
browser_->command_updater()->AddCommandObserver(IDC_BACK, this);
@@ -223,22 +219,6 @@ void ToolbarView::RemoveMenuListener(views::MenuListener* listener) {
}
}
-void ToolbarView::SetCollapsed(bool val) {
- if (collapsed_ == val)
- return;
-
- collapsed_ = val;
-
- // When switching to and from collapsed view, we need to force hide/show the
- // location bar entry view, like we do when we switch to full screen mode in
- // BrowserView::ProcessFullscreen. Otherwise the text view can appear floating
- // on top of web content.
- if (collapsed_)
- location_bar_->PushForceHidden();
- else
- location_bar_->PopForceHidden();
-}
-
////////////////////////////////////////////////////////////////////////////////
// ToolbarView, AccessibleToolbarView overrides:
@@ -416,8 +396,7 @@ gfx::Size ToolbarView::GetPreferredSize() {
normal_background = *rb.GetBitmapNamed(IDR_CONTENT_TOP_CENTER);
}
- return gfx::Size(min_width,
- collapsed_ ? kCollapsedToolbarHeight : normal_background.height());
+ return gfx::Size(min_width, normal_background.height());
}
int vertical_spacing = PopupTopSpacing() +
@@ -440,10 +419,6 @@ void ToolbarView::Layout() {
return;
}
- // In collapsed mode, we don't show any of the child controls.
- for (int i = 0; i < GetChildViewCount(); ++i)
- GetChildViewAt(i)->SetVisible(!collapsed_);
-
int child_y = std::min(kControlVertOffset, height());
// We assume all child elements are the same height.
int child_height =