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_gtk.h" | 5 #include "chrome/browser/gtk/browser_toolbar_gtk.h" |
6 | 6 |
7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/base_paths_linux.h" | 10 #include "base/base_paths_linux.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 &app_menu_button_); | 157 &app_menu_button_); |
158 app_menu_.reset(new MenuGtk(this, GetStandardAppMenu(), accel_group_)); | 158 app_menu_.reset(new MenuGtk(this, GetStandardAppMenu(), accel_group_)); |
159 | 159 |
160 gtk_widget_show_all(toolbar_); | 160 gtk_widget_show_all(toolbar_); |
161 } | 161 } |
162 | 162 |
163 void BrowserToolbarGtk::AddToolbarToBox(GtkWidget* box) { | 163 void BrowserToolbarGtk::AddToolbarToBox(GtkWidget* box) { |
164 gtk_box_pack_start(GTK_BOX(box), toolbar_, FALSE, FALSE, 0); | 164 gtk_box_pack_start(GTK_BOX(box), toolbar_, FALSE, FALSE, 0); |
165 } | 165 } |
166 | 166 |
| 167 void BrowserToolbarGtk::Show() { |
| 168 gtk_widget_show(toolbar_); |
| 169 } |
| 170 |
| 171 void BrowserToolbarGtk::Hide() { |
| 172 gtk_widget_hide(toolbar_); |
| 173 } |
| 174 |
167 LocationBar* BrowserToolbarGtk::GetLocationBar() const { | 175 LocationBar* BrowserToolbarGtk::GetLocationBar() const { |
168 return location_bar_.get(); | 176 return location_bar_.get(); |
169 } | 177 } |
170 | 178 |
171 void BrowserToolbarGtk::EnabledStateChangedForCommand(int id, bool enabled) { | 179 void BrowserToolbarGtk::EnabledStateChangedForCommand(int id, bool enabled) { |
172 GtkWidget* widget = NULL; | 180 GtkWidget* widget = NULL; |
173 switch (id) { | 181 switch (id) { |
174 case IDC_BACK: | 182 case IDC_BACK: |
175 widget = back_->widget(); | 183 widget = back_->widget(); |
176 break; | 184 break; |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 IDR_CONTENT_TOP_LEFT_CORNER, | 450 IDR_CONTENT_TOP_LEFT_CORNER, |
443 IDR_CONTENT_TOP_CENTER, | 451 IDR_CONTENT_TOP_CENTER, |
444 IDR_CONTENT_TOP_RIGHT_CORNER, | 452 IDR_CONTENT_TOP_RIGHT_CORNER, |
445 IDR_CONTENT_LEFT_SIDE, | 453 IDR_CONTENT_LEFT_SIDE, |
446 0, | 454 0, |
447 IDR_CONTENT_RIGHT_SIDE, | 455 IDR_CONTENT_RIGHT_SIDE, |
448 IDR_CONTENT_BOTTOM_LEFT_CORNER, | 456 IDR_CONTENT_BOTTOM_LEFT_CORNER, |
449 IDR_CONTENT_BOTTOM_CENTER, | 457 IDR_CONTENT_BOTTOM_CENTER, |
450 IDR_CONTENT_BOTTOM_RIGHT_CORNER)); | 458 IDR_CONTENT_BOTTOM_RIGHT_CORNER)); |
451 } | 459 } |
OLD | NEW |