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/views/toolbar_view.h" | 5 #include "chrome/browser/views/toolbar_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
10 #include "chrome/browser/browser.h" | 10 #include "chrome/browser/browser.h" |
11 #include "chrome/browser/browser_theme_provider.h" | |
12 #include "chrome/browser/browser_window.h" | 11 #include "chrome/browser/browser_window.h" |
13 #include "chrome/browser/pref_service.h" | 12 #include "chrome/browser/pref_service.h" |
14 #include "chrome/browser/profile.h" | 13 #include "chrome/browser/profile.h" |
| 14 #include "chrome/browser/themes/browser_theme_provider.h" |
15 #include "chrome/browser/upgrade_detector.h" | 15 #include "chrome/browser/upgrade_detector.h" |
16 #include "chrome/browser/view_ids.h" | 16 #include "chrome/browser/view_ids.h" |
17 #include "chrome/browser/views/browser_actions_container.h" | 17 #include "chrome/browser/views/browser_actions_container.h" |
18 #include "chrome/browser/views/event_utils.h" | 18 #include "chrome/browser/views/event_utils.h" |
19 #include "chrome/browser/views/frame/browser_view.h" | 19 #include "chrome/browser/views/frame/browser_view.h" |
20 #include "chrome/browser/views/wrench_menu.h" | 20 #include "chrome/browser/views/wrench_menu.h" |
21 #include "chrome/browser/wrench_menu_model.h" | 21 #include "chrome/browser/wrench_menu_model.h" |
22 #include "chrome/common/notification_service.h" | 22 #include "chrome/common/notification_service.h" |
23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
24 #include "gfx/canvas.h" | 24 #include "gfx/canvas.h" |
25 #include "gfx/canvas_skia.h" | 25 #include "gfx/canvas_skia.h" |
| 26 #include "gfx/skbitmap_operations.h" |
26 #include "grit/chromium_strings.h" | 27 #include "grit/chromium_strings.h" |
27 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
28 #include "gfx/skbitmap_operations.h" | |
29 #include "grit/theme_resources.h" | 29 #include "grit/theme_resources.h" |
30 #include "views/controls/button/button_dropdown.h" | 30 #include "views/controls/button/button_dropdown.h" |
31 #include "views/focus/view_storage.h" | 31 #include "views/focus/view_storage.h" |
32 #include "views/widget/tooltip_manager.h" | 32 #include "views/widget/tooltip_manager.h" |
33 #include "views/window/non_client_view.h" | 33 #include "views/window/non_client_view.h" |
34 #include "views/window/window.h" | 34 #include "views/window/window.h" |
35 | 35 |
36 // The space between items is 4 px in general. | 36 // The space between items is 4 px in general. |
37 const int ToolbarView::kStandardSpacing = 4; | 37 const int ToolbarView::kStandardSpacing = 4; |
38 // The top of the toolbar has an edge we have to skip over in addition to the 4 | 38 // The top of the toolbar has an edge we have to skip over in addition to the 4 |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 *tp->GetBitmapNamed(IDR_UPGRADE_DOT_ACTIVE), | 619 *tp->GetBitmapNamed(IDR_UPGRADE_DOT_ACTIVE), |
620 value); | 620 value); |
621 } | 621 } |
622 | 622 |
623 static const int kBadgeLeftSpacing = 8; | 623 static const int kBadgeLeftSpacing = 8; |
624 static const int kBadgeTopSpacing = 18; | 624 static const int kBadgeTopSpacing = 18; |
625 canvas->DrawBitmapInt(badge, kBadgeLeftSpacing, kBadgeTopSpacing); | 625 canvas->DrawBitmapInt(badge, kBadgeLeftSpacing, kBadgeTopSpacing); |
626 | 626 |
627 return canvas->ExtractBitmap(); | 627 return canvas->ExtractBitmap(); |
628 } | 628 } |
OLD | NEW |