| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/launcher/launcher.h" | 5 #include "ash/launcher/launcher.h" |
| 6 | 6 |
| 7 #include "ash/launcher/launcher_model.h" | 7 #include "ash/launcher/launcher_model.h" |
| 8 #include "ash/launcher/launcher_view.h" | 8 #include "ash/launcher/launcher_view.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Used to draw the background of the shelf. | 26 // Used to draw the background of the shelf. |
| 27 class ShelfPainter : public views::Painter { | 27 class ShelfPainter : public views::Painter { |
| 28 public: | 28 public: |
| 29 ShelfPainter() { | 29 ShelfPainter() { |
| 30 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 30 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 31 image_ = *rb.GetImageNamed(IDR_AURA_LAUNCHER_BACKGROUND).ToSkBitmap(); | 31 image_ = *rb.GetImageNamed(IDR_AURA_LAUNCHER_BACKGROUND).ToSkBitmap(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 virtual void Paint(int w, int h, gfx::Canvas* canvas) OVERRIDE { | 34 virtual void Paint(int w, int h, gfx::Canvas* canvas) OVERRIDE { |
| 35 canvas->TileImageInt(image_, 0, 0, w, h); | 35 canvas->TileImage(image_, gfx::Rect(0, 0, w, h)); |
| 36 } | 36 } |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 SkBitmap image_; | 39 SkBitmap image_; |
| 40 | 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(ShelfPainter); | 41 DISALLOW_COPY_AND_ASSIGN(ShelfPainter); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 } // namespace | 44 } // namespace |
| 45 | 45 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 void Launcher::SetStatusWidth(int width) { | 136 void Launcher::SetStatusWidth(int width) { |
| 137 delegate_view_->SetStatusWidth(width); | 137 delegate_view_->SetStatusWidth(width); |
| 138 } | 138 } |
| 139 | 139 |
| 140 int Launcher::GetStatusWidth() { | 140 int Launcher::GetStatusWidth() { |
| 141 return delegate_view_->status_width(); | 141 return delegate_view_->status_width(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace ash | 144 } // namespace ash |
| OLD | NEW |