OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #include <X11/XF86keysym.h> | 9 #include <X11/XF86keysym.h> |
10 | 10 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 gtk_chrome_button_unset_paint_state( | 344 gtk_chrome_button_unset_paint_state( |
345 GTK_CHROME_BUTTON(page_menu_button_.get())); | 345 GTK_CHROME_BUTTON(page_menu_button_.get())); |
346 } | 346 } |
347 | 347 |
348 gtk_chrome_button_set_hover_state( | 348 gtk_chrome_button_set_hover_state( |
349 GTK_CHROME_BUTTON(app_menu_button_.get()), 0.0); | 349 GTK_CHROME_BUTTON(app_menu_button_.get()), 0.0); |
350 gtk_chrome_button_unset_paint_state( | 350 gtk_chrome_button_unset_paint_state( |
351 GTK_CHROME_BUTTON(app_menu_button_.get())); | 351 GTK_CHROME_BUTTON(app_menu_button_.get())); |
352 } | 352 } |
353 | 353 |
| 354 GtkIconSet* BrowserToolbarGtk::GetIconSetForId(int idr) { |
| 355 return theme_provider_->GetIconSetForId(idr); |
| 356 } |
| 357 |
354 // menus::SimpleMenuModel::Delegate | 358 // menus::SimpleMenuModel::Delegate |
355 | 359 |
356 bool BrowserToolbarGtk::IsCommandIdEnabled(int id) const { | 360 bool BrowserToolbarGtk::IsCommandIdEnabled(int id) const { |
357 return browser_->command_updater()->IsCommandEnabled(id); | 361 return browser_->command_updater()->IsCommandEnabled(id); |
358 } | 362 } |
359 | 363 |
360 bool BrowserToolbarGtk::IsCommandIdChecked(int id) const { | 364 bool BrowserToolbarGtk::IsCommandIdChecked(int id) const { |
361 if (!profile_) | 365 if (!profile_) |
362 return false; | 366 return false; |
363 | 367 |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 int x_offset = base::i18n::IsRTL() ? | 808 int x_offset = base::i18n::IsRTL() ? |
805 sender->allocation.width - kUpgradeDotOffset - badge.width() : | 809 sender->allocation.width - kUpgradeDotOffset - badge.width() : |
806 kUpgradeDotOffset; | 810 kUpgradeDotOffset; |
807 canvas.DrawBitmapInt( | 811 canvas.DrawBitmapInt( |
808 badge, | 812 badge, |
809 sender->allocation.x + x_offset, | 813 sender->allocation.x + x_offset, |
810 sender->allocation.y + sender->allocation.height - badge.height()); | 814 sender->allocation.y + sender->allocation.height - badge.height()); |
811 | 815 |
812 return FALSE; | 816 return FALSE; |
813 } | 817 } |
OLD | NEW |