| 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/chromeos/status_area_button.h" | 5 #include "chrome/browser/chromeos/status_area_button.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
| 8 #include "app/gfx/skbitmap_operations.h" | 8 #include "app/gfx/skbitmap_operations.h" |
| 9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
| 10 #include "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
| 11 #include "views/border.h" | 11 #include "views/border.h" |
| 12 #include "views/view.h" | 12 #include "views/view.h" |
| 13 | 13 |
| 14 namespace chromeos { |
| 15 |
| 14 //////////////////////////////////////////////////////////////////////////////// | 16 //////////////////////////////////////////////////////////////////////////////// |
| 15 // StatusAreaButton | 17 // StatusAreaButton |
| 16 | 18 |
| 17 StatusAreaButton::StatusAreaButton(views::ViewMenuDelegate* menu_delegate) | 19 StatusAreaButton::StatusAreaButton(views::ViewMenuDelegate* menu_delegate) |
| 18 : MenuButton(NULL, std::wstring(), menu_delegate, false) { | 20 : MenuButton(NULL, std::wstring(), menu_delegate, false) { |
| 19 set_border(NULL); | 21 set_border(NULL); |
| 20 SetShowHighlighted(true); | 22 SetShowHighlighted(true); |
| 21 } | 23 } |
| 22 | 24 |
| 23 void StatusAreaButton::Paint(gfx::Canvas* canvas, bool for_drag) { | 25 void StatusAreaButton::Paint(gfx::Canvas* canvas, bool for_drag) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 39 } | 41 } |
| 40 SkBitmap* container = | 42 SkBitmap* container = |
| 41 ResourceBundle::GetSharedInstance().GetBitmapNamed(bitmap_id); | 43 ResourceBundle::GetSharedInstance().GetBitmapNamed(bitmap_id); |
| 42 canvas->DrawBitmapInt(*container, 0, 0); | 44 canvas->DrawBitmapInt(*container, 0, 0); |
| 43 DrawIcon(canvas); | 45 DrawIcon(canvas); |
| 44 } | 46 } |
| 45 | 47 |
| 46 void StatusAreaButton::DrawIcon(gfx::Canvas* canvas) { | 48 void StatusAreaButton::DrawIcon(gfx::Canvas* canvas) { |
| 47 canvas->DrawBitmapInt(icon(), 0, 0); | 49 canvas->DrawBitmapInt(icon(), 0, 0); |
| 48 } | 50 } |
| 51 |
| 52 } // namespace chromeos |
| OLD | NEW |