Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: ash/shelf/overflow_button.cc

Issue 1119983006: [ash/shelf] ResourceBundle should be used as pointer not non-const ref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 30
31 const int kButtonHoverSize = 28; 31 const int kButtonHoverSize = 28;
32 32
33 const int kBackgroundOffset = (48 - kButtonHoverSize) / 2; 33 const int kBackgroundOffset = (48 - kButtonHoverSize) / 2;
34 34
35 } // namesapce 35 } // namesapce
36 36
37 OverflowButton::OverflowButton(views::ButtonListener* listener) 37 OverflowButton::OverflowButton(views::ButtonListener* listener)
38 : CustomButton(listener), 38 : CustomButton(listener),
39 bottom_image_(NULL) { 39 bottom_image_(NULL) {
40 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 40 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
41 bottom_image_ = rb.GetImageNamed(IDR_ASH_SHELF_OVERFLOW).ToImageSkia(); 41 bottom_image_ = rb->GetImageNamed(IDR_ASH_SHELF_OVERFLOW).ToImageSkia();
42
43 42
44 SetAccessibilityFocusable(true); 43 SetAccessibilityFocusable(true);
45 SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_OVERFLOW_NAME)); 44 SetAccessibleName(l10n_util::GetStringUTF16(IDS_ASH_SHELF_OVERFLOW_NAME));
46 } 45 }
47 46
48 OverflowButton::~OverflowButton() {} 47 OverflowButton::~OverflowButton() {}
49 48
50 void OverflowButton::OnShelfAlignmentChanged() { 49 void OverflowButton::OnShelfAlignmentChanged() {
51 SchedulePaint(); 50 SchedulePaint();
52 } 51 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 image = bottom_image_; 141 image = bottom_image_;
143 break; 142 break;
144 } 143 }
145 144
146 canvas->DrawImageInt(*image, 145 canvas->DrawImageInt(*image,
147 bounds.x() + ((bounds.width() - image->width()) / 2), 146 bounds.x() + ((bounds.width() - image->width()) / 2),
148 bounds.y() + ((bounds.height() - image->height()) / 2)); 147 bounds.y() + ((bounds.height() - image->height()) / 2));
149 } 148 }
150 149
151 } // namespace ash 150 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698