| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/shelf/overflow_button.h" | 5 #include "ash/shelf/overflow_button.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/shelf/shelf_layout_manager.h" | 8 #include "ash/shelf/shelf_layout_manager.h" |
| 9 #include "ash/shelf/shelf_widget.h" | 9 #include "ash/shelf/shelf_widget.h" |
| 10 #include "grit/ash_resources.h" | 10 #include "grit/ash_resources.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 } // namesapce | 37 } // namesapce |
| 38 | 38 |
| 39 OverflowButton::OverflowButton(views::ButtonListener* listener) | 39 OverflowButton::OverflowButton(views::ButtonListener* listener) |
| 40 : CustomButton(listener), | 40 : CustomButton(listener), |
| 41 bottom_image_(NULL) { | 41 bottom_image_(NULL) { |
| 42 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 42 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 43 bottom_image_ = rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToImageSkia(); | 43 bottom_image_ = rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToImageSkia(); |
| 44 | 44 |
| 45 | 45 |
| 46 set_accessibility_focusable(true); | 46 SetAccessibilityFocusable(true); |
| 47 SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_OVERFLOW_NAME)); | 47 SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_OVERFLOW_NAME)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 OverflowButton::~OverflowButton() {} | 50 OverflowButton::~OverflowButton() {} |
| 51 | 51 |
| 52 void OverflowButton::OnShelfAlignmentChanged() { | 52 void OverflowButton::OnShelfAlignmentChanged() { |
| 53 SchedulePaint(); | 53 SchedulePaint(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void OverflowButton::PaintBackground(gfx::Canvas* canvas, int alpha) { | 56 void OverflowButton::PaintBackground(gfx::Canvas* canvas, int alpha) { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 break; | 166 break; |
| 167 } | 167 } |
| 168 | 168 |
| 169 canvas->DrawImageInt(*image, | 169 canvas->DrawImageInt(*image, |
| 170 bounds.x() + ((bounds.width() - image->width()) / 2), | 170 bounds.x() + ((bounds.width() - image->width()) / 2), |
| 171 bounds.y() + ((bounds.height() - image->height()) / 2)); | 171 bounds.y() + ((bounds.height() - image->height()) / 2)); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace internal | 174 } // namespace internal |
| 175 } // namespace ash | 175 } // namespace ash |
| OLD | NEW |