summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-21 19:03:27 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-21 19:03:27 +0000
commit69be462d691924b162c55a046b22d7f5d2bcca08 (patch)
tree8e0461bcc71f081d06f7552177456435c00b65e7 /chrome/browser/chromeos
parent31d2fd0291b4f829907a67dabdd07dfe61885117 (diff)
downloadchromium_src-69be462d691924b162c55a046b22d7f5d2bcca08.zip
chromium_src-69be462d691924b162c55a046b22d7f5d2bcca08.tar.gz
chromium_src-69be462d691924b162c55a046b22d7f5d2bcca08.tar.bz2
The main menu button is now enabled by default.
BUG=none TEST=none Review URL: http://codereview.chromium.org/214034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26708 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r--chrome/browser/chromeos/compact_navigation_bar.cc21
-rw-r--r--chrome/browser/chromeos/compact_navigation_bar.h2
-rw-r--r--chrome/browser/chromeos/main_menu.cc12
-rw-r--r--chrome/browser/chromeos/main_menu.h2
4 files changed, 11 insertions, 26 deletions
diff --git a/chrome/browser/chromeos/compact_navigation_bar.cc b/chrome/browser/chromeos/compact_navigation_bar.cc
index 35fafc3..1c067b2 100644
--- a/chrome/browser/chromeos/compact_navigation_bar.cc
+++ b/chrome/browser/chromeos/compact_navigation_bar.cc
@@ -27,7 +27,8 @@ static const int kHorizPadding = 3;
static const int kURLWidth = 180;
-static const int kChromeButtonSize = 25;
+// Preferred height.
+static const int kPreferredHeight = 25;
// Draw this much white around the URL bar to make it look larger than it
// actually is.
@@ -47,13 +48,6 @@ void CompactNavigationBar::Init() {
ResourceBundle& resource_bundle = ResourceBundle::GetSharedInstance();
- chrome_button_ = new views::ImageButton(this);
- chrome_button_->SetImage(views::CustomButton::BS_NORMAL,
- resource_bundle.GetBitmapNamed(IDR_COMPACTNAV_CHROME));
- chrome_button_->SetImageAlignment(views::ImageButton::ALIGN_CENTER,
- views::ImageButton::ALIGN_MIDDLE);
- AddChildView(chrome_button_);
-
back_button_ = new views::ImageButton(this);
back_button_->SetImage(views::CustomButton::BS_NORMAL,
resource_bundle.GetBitmapNamed(IDR_COMPACTNAV_BACK));
@@ -90,7 +84,6 @@ void CompactNavigationBar::Init() {
gfx::Size CompactNavigationBar::GetPreferredSize() {
int width = 0;
- width += kChromeButtonSize + kHorizPadding; // Chrome button.
width += kURLWidth + kHorizPadding + kURLPadding * 2; // URL bar.
width += back_button_->GetPreferredSize().width() + kHorizPadding +
kInnerPadding * 2;
@@ -99,7 +92,7 @@ gfx::Size CompactNavigationBar::GetPreferredSize() {
kInnerPadding * 2;
width++;
- return gfx::Size(width, kChromeButtonSize);
+ return gfx::Size(width, kPreferredHeight);
}
void CompactNavigationBar::Layout() {
@@ -108,9 +101,6 @@ void CompactNavigationBar::Layout() {
int curx = 0;
- chrome_button_->SetBounds(curx, 0, kChromeButtonSize, height());
- curx += kChromeButtonSize + kHorizPadding;
-
// "Back | Forward" section.
gfx::Size button_size = back_button_->GetPreferredSize();
button_size.set_width(button_size.width() + kInnerPadding * 2);
@@ -159,10 +149,7 @@ void CompactNavigationBar::ButtonPressed(
if (!tab_contents)
return;
- if (sender == chrome_button_) {
- AddTabWithURL(GURL("http://goto.ext.google.com/tik-tok"),
- PageTransition::START_PAGE);
- } else if (sender == back_button_) {
+ if (sender == back_button_) {
if (tab_contents->controller().CanGoBack())
tab_contents->controller().GoBack();
} else if (sender == forward_button_) {
diff --git a/chrome/browser/chromeos/compact_navigation_bar.h b/chrome/browser/chromeos/compact_navigation_bar.h
index a0553bd..d5e4961 100644
--- a/chrome/browser/chromeos/compact_navigation_bar.h
+++ b/chrome/browser/chromeos/compact_navigation_bar.h
@@ -64,8 +64,6 @@ class CompactNavigationBar : public views::View,
bool initialized_;
- views::ImageButton* chrome_button_;
-
views::ImageButton* back_button_;
views::ImageView* bf_separator_;
views::ImageButton* forward_button_;
diff --git a/chrome/browser/chromeos/main_menu.cc b/chrome/browser/chromeos/main_menu.cc
index 753c97f..08fc0b2 100644
--- a/chrome/browser/chromeos/main_menu.cc
+++ b/chrome/browser/chromeos/main_menu.cc
@@ -32,12 +32,12 @@ void MainMenu::Show(Browser* browser) {
}
MainMenu::MainMenu(Browser* browser)
- : browser_(browser),
- popup_(NULL),
- site_instance_(NULL),
- menu_rvh_(NULL),
- rwhv_(NULL),
- child_rvh_(NULL) {
+ : browser_(browser),
+ popup_(NULL),
+ site_instance_(NULL),
+ menu_rvh_(NULL),
+ rwhv_(NULL),
+ child_rvh_(NULL) {
}
MainMenu::~MainMenu() {
diff --git a/chrome/browser/chromeos/main_menu.h b/chrome/browser/chromeos/main_menu.h
index d475ce5..2d53974 100644
--- a/chrome/browser/chromeos/main_menu.h
+++ b/chrome/browser/chromeos/main_menu.h
@@ -17,7 +17,7 @@ namespace views {
class Widget;
}
-// MainMenu manages shoing the main menu. The menu is currently an HTML page.
+// MainMenu manages showing the main menu. The menu is currently an HTML page.
// When the user clicks a link on the page a new tab is added to the current
// browser and the menu is hidden.
//