summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/theme/compactnav_chrome.pngbin842 -> 0 bytes
-rw-r--r--chrome/app/theme/theme_resources.grd1
-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
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc28
7 files changed, 23 insertions, 43 deletions
diff --git a/chrome/app/theme/compactnav_chrome.png b/chrome/app/theme/compactnav_chrome.png
deleted file mode 100644
index e51d326..0000000
--- a/chrome/app/theme/compactnav_chrome.png
+++ /dev/null
Binary files differ
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd
index c92b4ce..a01865b 100644
--- a/chrome/app/theme/theme_resources.grd
+++ b/chrome/app/theme/theme_resources.grd
@@ -352,7 +352,6 @@
<include name="IDR_THEME_FRAME_INCOGNITO" file="theme_frame_default_incognito2.png" type="BINDATA" />
<include name="IDR_THEME_FRAME_INACTIVE" file="theme_frame_default_inactive2.png" type="BINDATA" />
- <include name="IDR_COMPACTNAV_CHROME" file="compactnav_chrome.png" type="BINDATA" />
<include name="IDR_COMPACTNAV_BACK" file="compactnav_back.png" type="BINDATA" />
<include name="IDR_COMPACTNAV_FORWARD" file="compactnav_forward.png" type="BINDATA" />
<include name="IDR_COMPACTNAV_SEPARATOR" file="compactnav_separator.png" type="BINDATA" />
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.
//
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 7134f2c..eea9e7e 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -84,10 +84,6 @@
#include "chrome/browser/views/panel_controller.h"
#include "chrome/browser/views/tabs/tab_overview_types.h"
#include "views/widget/widget_gtk.h"
-
-// This command-line switch enables the main menu button in the upper left
-// corner. By default it isn't shown.
-static const wchar_t kShowMainMenuButton[] = L"main-menu-button";
#endif
namespace {
@@ -1553,13 +1549,23 @@ void BrowserWindowGtk::InitWidgets() {
GtkWidget* status_hbox = NULL;
bool has_compact_nav_bar = next_window_should_use_compact_nav_;
if (browser_->type() == Browser::TYPE_NORMAL) {
- bool show_main_menu_button =
- CommandLine::ForCurrentProcess()->HasSwitch(kShowMainMenuButton);
// Make a box that we'll later insert the compact navigation bar into. The
// tabstrip must go into an hbox with our box so that they can get arranged
// horizontally.
titlebar_hbox = gtk_hbox_new(FALSE, 0);
gtk_widget_show(titlebar_hbox);
+
+ // Main menu button.
+ CustomDrawButton* main_menu_button =
+ new CustomDrawButton(IDR_MAIN_MENU_BUTTON, IDR_MAIN_MENU_BUTTON,
+ IDR_MAIN_MENU_BUTTON, 0);
+ gtk_widget_show(main_menu_button->widget());
+ g_signal_connect(G_OBJECT(main_menu_button->widget()), "clicked",
+ G_CALLBACK(OnMainMenuButtonClicked), this);
+ GTK_WIDGET_UNSET_FLAGS(main_menu_button->widget(), GTK_CAN_FOCUS);
+ gtk_box_pack_start(GTK_BOX(titlebar_hbox), main_menu_button->widget(),
+ FALSE, FALSE, 0);
+
if (has_compact_nav_bar) {
navbar_hbox = gtk_hbox_new(FALSE, 0);
gtk_widget_show(navbar_hbox);
@@ -1568,16 +1574,6 @@ void BrowserWindowGtk::InitWidgets() {
// Reset the compact nav bit now that we're creating the next toplevel
// window. Code below will use our local has_compact_nav_bar variable.
next_window_should_use_compact_nav_ = false;
- } else if (show_main_menu_button) {
- CustomDrawButton* main_menu_button =
- new CustomDrawButton(IDR_MAIN_MENU_BUTTON, IDR_MAIN_MENU_BUTTON,
- IDR_MAIN_MENU_BUTTON, 0);
- gtk_widget_show(main_menu_button->widget());
- g_signal_connect(G_OBJECT(main_menu_button->widget()), "clicked",
- G_CALLBACK(OnMainMenuButtonClicked), this);
- GTK_WIDGET_UNSET_FLAGS(main_menu_button->widget(), GTK_CAN_FOCUS);
- gtk_box_pack_start(GTK_BOX(titlebar_hbox), main_menu_button->widget(),
- FALSE, FALSE, 0);
}
status_hbox = gtk_hbox_new(FALSE, 0);
gtk_widget_show(status_hbox);