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 #ifndef ASH_WM_IMAGE_GRID_H_ | 5 #ifndef ASH_WM_IMAGE_GRID_H_ |
6 #define ASH_WM_IMAGE_GRID_H_ | 6 #define ASH_WM_IMAGE_GRID_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 public: | 132 public: |
133 ImagePainter(const gfx::Image* image) : image_(image) {} | 133 ImagePainter(const gfx::Image* image) : image_(image) {} |
134 virtual ~ImagePainter() {} | 134 virtual ~ImagePainter() {} |
135 | 135 |
136 // Clips |layer| to |clip_rect|. Triggers a repaint if the clipping | 136 // Clips |layer| to |clip_rect|. Triggers a repaint if the clipping |
137 // rectangle has changed. An empty rectangle disables clipping. | 137 // rectangle has changed. An empty rectangle disables clipping. |
138 void SetClipRect(const gfx::Rect& clip_rect, ui::Layer* layer); | 138 void SetClipRect(const gfx::Rect& clip_rect, ui::Layer* layer); |
139 | 139 |
140 // ui::LayerDelegate implementation: | 140 // ui::LayerDelegate implementation: |
141 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; | 141 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |
| 142 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
142 | 143 |
143 private: | 144 private: |
144 friend class TestAPI; | 145 friend class TestAPI; |
145 | 146 |
146 const gfx::Image* image_; // not owned | 147 const gfx::Image* image_; // not owned |
147 | 148 |
148 gfx::Rect clip_rect_; | 149 gfx::Rect clip_rect_; |
149 | 150 |
150 DISALLOW_COPY_AND_ASSIGN(ImagePainter); | 151 DISALLOW_COPY_AND_ASSIGN(ImagePainter); |
151 }; | 152 }; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 scoped_ptr<ImagePainter> bottom_painter_; | 209 scoped_ptr<ImagePainter> bottom_painter_; |
209 scoped_ptr<ImagePainter> bottom_right_painter_; | 210 scoped_ptr<ImagePainter> bottom_right_painter_; |
210 | 211 |
211 DISALLOW_COPY_AND_ASSIGN(ImageGrid); | 212 DISALLOW_COPY_AND_ASSIGN(ImageGrid); |
212 }; | 213 }; |
213 | 214 |
214 } // namespace internal | 215 } // namespace internal |
215 } // namespace ash | 216 } // namespace ash |
216 | 217 |
217 #endif // ASH_WM_IMAGE_GRID_H_ | 218 #endif // ASH_WM_IMAGE_GRID_H_ |
OLD | NEW |