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 UI_WM_CORE_IMAGE_GRID_H_ | 5 #ifndef UI_WM_CORE_IMAGE_GRID_H_ |
6 #define UI_WM_CORE_IMAGE_GRID_H_ | 6 #define UI_WM_CORE_IMAGE_GRID_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 public: | 131 public: |
132 ImagePainter(const gfx::ImageSkia& image) : image_(image) {} | 132 ImagePainter(const gfx::ImageSkia& image) : image_(image) {} |
133 virtual ~ImagePainter() {} | 133 virtual ~ImagePainter() {} |
134 | 134 |
135 // Clips |layer| to |clip_rect|. Triggers a repaint if the clipping | 135 // Clips |layer| to |clip_rect|. Triggers a repaint if the clipping |
136 // rectangle has changed. An empty rectangle disables clipping. | 136 // rectangle has changed. An empty rectangle disables clipping. |
137 void SetClipRect(const gfx::Rect& clip_rect, ui::Layer* layer); | 137 void SetClipRect(const gfx::Rect& clip_rect, ui::Layer* layer); |
138 | 138 |
139 // ui::LayerDelegate implementation: | 139 // ui::LayerDelegate implementation: |
140 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; | 140 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |
| 141 virtual void OnDelegatedFrameDamage( |
| 142 const gfx::Rect& damage_rect_in_dip) OVERRIDE {} |
141 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 143 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
142 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE; | 144 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE; |
143 | 145 |
144 private: | 146 private: |
145 friend class TestAPI; | 147 friend class TestAPI; |
146 | 148 |
147 const gfx::ImageSkia image_; | 149 const gfx::ImageSkia image_; |
148 | 150 |
149 gfx::Rect clip_rect_; | 151 gfx::Rect clip_rect_; |
150 | 152 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 scoped_ptr<ImagePainter> bottom_left_painter_; | 214 scoped_ptr<ImagePainter> bottom_left_painter_; |
213 scoped_ptr<ImagePainter> bottom_painter_; | 215 scoped_ptr<ImagePainter> bottom_painter_; |
214 scoped_ptr<ImagePainter> bottom_right_painter_; | 216 scoped_ptr<ImagePainter> bottom_right_painter_; |
215 | 217 |
216 DISALLOW_COPY_AND_ASSIGN(ImageGrid); | 218 DISALLOW_COPY_AND_ASSIGN(ImageGrid); |
217 }; | 219 }; |
218 | 220 |
219 } // namespace wm | 221 } // namespace wm |
220 | 222 |
221 #endif // UI_WM_CORE_IMAGE_GRID_H_ | 223 #endif // UI_WM_CORE_IMAGE_GRID_H_ |
OLD | NEW |