| 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 #include <X11/XF86keysym.h> | 8 #include <X11/XF86keysym.h> |
| 9 | 9 |
| 10 #include "app/gtk_dnd_util.h" | 10 #include "app/gtk_dnd_util.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 const GdkColor kSecureColor = GDK_COLOR_RGB(255, 245, 195); | 72 const GdkColor kSecureColor = GDK_COLOR_RGB(255, 245, 195); |
| 73 | 73 |
| 74 } // namespace | 74 } // namespace |
| 75 | 75 |
| 76 // BrowserToolbarGtk, public --------------------------------------------------- | 76 // BrowserToolbarGtk, public --------------------------------------------------- |
| 77 | 77 |
| 78 BrowserToolbarGtk::BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window) | 78 BrowserToolbarGtk::BrowserToolbarGtk(Browser* browser, BrowserWindowGtk* window) |
| 79 : toolbar_(NULL), | 79 : toolbar_(NULL), |
| 80 location_bar_(new LocationBarViewGtk(browser->command_updater(), | 80 location_bar_(new LocationBarViewGtk(browser->command_updater(), |
| 81 browser->toolbar_model(), | 81 browser->toolbar_model(), |
| 82 this)), | 82 this, |
| 83 browser)), |
| 83 model_(browser->toolbar_model()), | 84 model_(browser->toolbar_model()), |
| 84 browser_(browser), | 85 browser_(browser), |
| 85 window_(window), | 86 window_(window), |
| 86 profile_(NULL), | 87 profile_(NULL), |
| 87 menu_bar_helper_(this) { | 88 menu_bar_helper_(this) { |
| 88 browser_->command_updater()->AddCommandObserver(IDC_BACK, this); | 89 browser_->command_updater()->AddCommandObserver(IDC_BACK, this); |
| 89 browser_->command_updater()->AddCommandObserver(IDC_FORWARD, this); | 90 browser_->command_updater()->AddCommandObserver(IDC_FORWARD, this); |
| 90 browser_->command_updater()->AddCommandObserver(IDC_RELOAD, this); | 91 browser_->command_updater()->AddCommandObserver(IDC_RELOAD, this); |
| 91 browser_->command_updater()->AddCommandObserver(IDC_HOME, this); | 92 browser_->command_updater()->AddCommandObserver(IDC_HOME, this); |
| 92 browser_->command_updater()->AddCommandObserver(IDC_STAR, this); | 93 browser_->command_updater()->AddCommandObserver(IDC_STAR, this); |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 menu->PopupAsFromKeyEvent(button); | 696 menu->PopupAsFromKeyEvent(button); |
| 696 menu_bar_helper_.MenuStartedShowing(button, menu->widget()); | 697 menu_bar_helper_.MenuStartedShowing(button, menu->widget()); |
| 697 } | 698 } |
| 698 | 699 |
| 699 void BrowserToolbarGtk::PopupForButtonNextTo(GtkWidget* button, | 700 void BrowserToolbarGtk::PopupForButtonNextTo(GtkWidget* button, |
| 700 GtkMenuDirectionType dir) { | 701 GtkMenuDirectionType dir) { |
| 701 GtkWidget* other_button = button == page_menu_button_.get() ? | 702 GtkWidget* other_button = button == page_menu_button_.get() ? |
| 702 app_menu_button_.get() : page_menu_button_.get(); | 703 app_menu_button_.get() : page_menu_button_.get(); |
| 703 PopupForButton(other_button); | 704 PopupForButton(other_button); |
| 704 } | 705 } |
| OLD | NEW |