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_actions_toolbar_gtk.h" | 5 #include "chrome/browser/gtk/browser_actions_toolbar_gtk.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "app/gfx/canvas_paint.h" | |
10 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
11 #include "chrome/browser/extensions/extension_browser_event_router.h" | 10 #include "chrome/browser/extensions/extension_browser_event_router.h" |
12 #include "chrome/browser/extensions/extension_context_menu_model.h" | 11 #include "chrome/browser/extensions/extension_context_menu_model.h" |
13 #include "chrome/browser/extensions/extensions_service.h" | 12 #include "chrome/browser/extensions/extensions_service.h" |
14 #include "chrome/browser/extensions/image_loading_tracker.h" | 13 #include "chrome/browser/extensions/image_loading_tracker.h" |
15 #include "chrome/browser/gtk/cairo_cached_surface.h" | 14 #include "chrome/browser/gtk/cairo_cached_surface.h" |
16 #include "chrome/browser/gtk/extension_popup_gtk.h" | 15 #include "chrome/browser/gtk/extension_popup_gtk.h" |
17 #include "chrome/browser/gtk/gtk_chrome_button.h" | 16 #include "chrome/browser/gtk/gtk_chrome_button.h" |
18 #include "chrome/browser/gtk/gtk_chrome_shrinkable_hbox.h" | 17 #include "chrome/browser/gtk/gtk_chrome_shrinkable_hbox.h" |
19 #include "chrome/browser/gtk/gtk_theme_provider.h" | 18 #include "chrome/browser/gtk/gtk_theme_provider.h" |
20 #include "chrome/browser/gtk/gtk_util.h" | 19 #include "chrome/browser/gtk/gtk_util.h" |
21 #include "chrome/browser/gtk/menu_gtk.h" | 20 #include "chrome/browser/gtk/menu_gtk.h" |
22 #include "chrome/browser/gtk/view_id_util.h" | 21 #include "chrome/browser/gtk/view_id_util.h" |
23 #include "chrome/browser/profile.h" | 22 #include "chrome/browser/profile.h" |
24 #include "chrome/browser/tab_contents/tab_contents.h" | 23 #include "chrome/browser/tab_contents/tab_contents.h" |
25 #include "chrome/common/extensions/extension.h" | 24 #include "chrome/common/extensions/extension.h" |
26 #include "chrome/common/extensions/extension_action.h" | 25 #include "chrome/common/extensions/extension_action.h" |
27 #include "chrome/common/notification_details.h" | 26 #include "chrome/common/notification_details.h" |
28 #include "chrome/common/notification_service.h" | 27 #include "chrome/common/notification_service.h" |
29 #include "chrome/common/notification_source.h" | 28 #include "chrome/common/notification_source.h" |
30 #include "chrome/common/notification_type.h" | 29 #include "chrome/common/notification_type.h" |
| 30 #include "gfx/canvas_paint.h" |
31 #include "gfx/gtk_util.h" | 31 #include "gfx/gtk_util.h" |
32 #include "grit/app_resources.h" | 32 #include "grit/app_resources.h" |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 // The size of each button on the toolbar. | 36 // The size of each button on the toolbar. |
37 const int kButtonSize = 29; | 37 const int kButtonSize = 29; |
38 | 38 |
39 // The padding between browser action buttons. Visually, the actual number of | 39 // The padding between browser action buttons. Visually, the actual number of |
40 // "empty" (non-drawing) pixels is this value + 2 when adjacent browser icons | 40 // "empty" (non-drawing) pixels is this value + 2 when adjacent browser icons |
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 | 746 |
747 // TODO(estade): set the menu item's tooltip. | 747 // TODO(estade): set the menu item's tooltip. |
748 } | 748 } |
749 | 749 |
750 gtk_chrome_button_set_paint_state(GTK_CHROME_BUTTON(overflow), | 750 gtk_chrome_button_set_paint_state(GTK_CHROME_BUTTON(overflow), |
751 GTK_STATE_ACTIVE); | 751 GTK_STATE_ACTIVE); |
752 overflow_menu_->PopupAsFromKeyEvent(overflow); | 752 overflow_menu_->PopupAsFromKeyEvent(overflow); |
753 | 753 |
754 return FALSE; | 754 return FALSE; |
755 } | 755 } |
OLD | NEW |