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

Unified Diff: ash/shelf/shelf_widget.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_widget.cc
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 96e75ce478ab819ff8c7b95e119871cf20770067..95bc68942fe037c6299fadd5de03a2f1e22a551c 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -172,9 +172,9 @@ void DimmerView::ForceUndimming(bool force) {
void DimmerView::OnPaintBackground(gfx::Canvas* canvas) {
SkPaint paint;
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+ ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
gfx::ImageSkia shelf_background =
- *rb.GetImageNamed(IDR_ASH_SHELF_DIMMING).ToImageSkia();
+ *rb->GetImageNamed(IDR_ASH_SHELF_DIMMING).ToImageSkia();
if (shelf_->GetAlignment() != ash::SHELF_ALIGNMENT_BOTTOM) {
shelf_background = gfx::ImageSkiaOperations::CreateRotatedImage(
@@ -463,9 +463,9 @@ void ShelfWidget::DelegateView::SetParentLayer(ui::Layer* layer) {
}
void ShelfWidget::DelegateView::OnPaintBackground(gfx::Canvas* canvas) {
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+ ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
gfx::ImageSkia shelf_background =
- *rb.GetImageSkiaNamed(IDR_ASH_SHELF_BACKGROUND);
+ *rb->GetImageSkiaNamed(IDR_ASH_SHELF_BACKGROUND);
if (SHELF_ALIGNMENT_BOTTOM != shelf_->GetAlignment())
shelf_background = gfx::ImageSkiaOperations::CreateRotatedImage(
shelf_background,
@@ -498,7 +498,7 @@ void ShelfWidget::DelegateView::OnPaintBackground(gfx::Canvas* canvas) {
// The part of the shelf background that is in the corner below the docked
// windows close to the work area is an arched gradient that blends
// vertically oriented docked background and horizontal shelf.
- gfx::ImageSkia shelf_corner = *rb.GetImageSkiaNamed(IDR_ASH_SHELF_CORNER);
+ gfx::ImageSkia shelf_corner = *rb->GetImageSkiaNamed(IDR_ASH_SHELF_CORNER);
if (dock_bounds.x() == 0) {
shelf_corner = gfx::ImageSkiaOperations::CreateRotatedImage(
shelf_corner, SkBitmapOperations::ROTATION_90_CW);
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698