| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/gtk/browser_toolbar_view_gtk.h" | 5 #include "chrome/browser/gtk/browser_toolbar_view_gtk.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/base_paths_linux.h" | 8 #include "base/base_paths_linux.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 gtk_box_pack_start(GTK_BOX(toolbar_), button->widget(), FALSE, FALSE, 0); | 210 gtk_box_pack_start(GTK_BOX(toolbar_), button->widget(), FALSE, FALSE, 0); |
| 211 | 211 |
| 212 return button; | 212 return button; |
| 213 } | 213 } |
| 214 | 214 |
| 215 // static | 215 // static |
| 216 void BrowserToolbarGtk::OnEntryActivate(GtkEntry *entry, | 216 void BrowserToolbarGtk::OnEntryActivate(GtkEntry *entry, |
| 217 BrowserToolbarGtk* toolbar) { | 217 BrowserToolbarGtk* toolbar) { |
| 218 GURL dest(URLFixerUpper::FixupURL(std::string(gtk_entry_get_text(entry)), | 218 GURL dest(URLFixerUpper::FixupURL(std::string(gtk_entry_get_text(entry)), |
| 219 std::string())); | 219 std::string())); |
| 220 toolbar->browser_->OpenURLFromTab(NULL, dest, GURL(), | |
| 221 CURRENT_TAB, | |
| 222 PageTransition::TYPED); | |
| 223 toolbar->browser_->GetSelectedTabContents()-> | 220 toolbar->browser_->GetSelectedTabContents()-> |
| 224 OpenURL(dest, GURL(), CURRENT_TAB, PageTransition::TYPED); | 221 OpenURL(dest, GURL(), CURRENT_TAB, PageTransition::TYPED); |
| 225 } | 222 } |
| 226 | 223 |
| 227 /* static */ | 224 /* static */ |
| 228 void BrowserToolbarGtk::OnButtonClick(GtkWidget* button, | 225 void BrowserToolbarGtk::OnButtonClick(GtkWidget* button, |
| 229 BrowserToolbarGtk* toolbar) { | 226 BrowserToolbarGtk* toolbar) { |
| 230 int tag = -1; | 227 int tag = -1; |
| 231 if (button == toolbar->back_->widget()) | 228 if (button == toolbar->back_->widget()) |
| 232 tag = IDC_BACK; | 229 tag = IDC_BACK; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 app_menu_.reset(new MenuGtk(this, GetStandardAppMenu())); | 332 app_menu_.reset(new MenuGtk(this, GetStandardAppMenu())); |
| 336 } | 333 } |
| 337 | 334 |
| 338 app_menu_->Popup(app_menu_button_->widget(), button_press_event); | 335 app_menu_->Popup(app_menu_button_->widget(), button_press_event); |
| 339 } | 336 } |
| 340 | 337 |
| 341 CustomDrawButton* BrowserToolbarGtk::MakeHomeButton() { | 338 CustomDrawButton* BrowserToolbarGtk::MakeHomeButton() { |
| 342 return BuildToolbarButton(IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, | 339 return BuildToolbarButton(IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, |
| 343 l10n_util::GetString(IDS_TOOLTIP_HOME)); | 340 l10n_util::GetString(IDS_TOOLTIP_HOME)); |
| 344 } | 341 } |
| OLD | NEW |