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 "base/basictypes.h" | 10 #include "base/basictypes.h" |
10 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "ash/ash_export.h" | 13 #include "ui/compositor/layer.h" |
13 #include "ui/gfx/compositor/layer.h" | 14 #include "ui/compositor/layer_delegate.h" |
14 #include "ui/gfx/compositor/layer_delegate.h" | |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 #include "ui/gfx/size.h" | 16 #include "ui/gfx/size.h" |
17 | 17 |
18 namespace aura { | 18 namespace aura { |
19 class Window; | 19 class Window; |
20 } // namespace aura | 20 } // namespace aura |
21 | 21 |
22 namespace gfx { | 22 namespace gfx { |
23 class Image; | 23 class Image; |
24 } // namespace gfx | 24 } // namespace gfx |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 // Sets |layer_ptr| and |painter_ptr| to display |image| and adds the | 163 // Sets |layer_ptr| and |painter_ptr| to display |image| and adds the |
164 // passed-in layer to |layer_|. If image is NULL resets |layer_ptr| and | 164 // passed-in layer to |layer_|. If image is NULL resets |layer_ptr| and |
165 // |painter_ptr| and removes any existing layer from |layer_|. | 165 // |painter_ptr| and removes any existing layer from |layer_|. |
166 void SetImage(const gfx::Image* image, | 166 void SetImage(const gfx::Image* image, |
167 scoped_ptr<ui::Layer>* layer_ptr, | 167 scoped_ptr<ui::Layer>* layer_ptr, |
168 scoped_ptr<ImagePainter>* painter_ptr); | 168 scoped_ptr<ImagePainter>* painter_ptr); |
169 | 169 |
170 // A possibly-arbitrary window that is drawn at the same DPI | 170 // A possibly-arbitrary window that is drawn at the same DPI |
171 // (i.e. on the same monitor) as this grid. | 171 // (i.e. on the same monitor) as this grid. |
172 // TODO(oshima): move scale factor to gfx/compositor and remove this. | 172 // TODO(oshima): move scale factor to ui/compositor/ and remove this. |
173 aura::Window* window_; | 173 aura::Window* window_; |
174 | 174 |
175 // Layer that contains all of the image layers. | 175 // Layer that contains all of the image layers. |
176 scoped_ptr<ui::Layer> layer_; | 176 scoped_ptr<ui::Layer> layer_; |
177 | 177 |
178 // The grid's dimensions. | 178 // The grid's dimensions. |
179 gfx::Size size_; | 179 gfx::Size size_; |
180 | 180 |
181 // Heights and widths of the images displayed by |top_layer_|, | 181 // Heights and widths of the images displayed by |top_layer_|, |
182 // |bottom_layer_|, |left_layer_|, and |right_layer_|. | 182 // |bottom_layer_|, |left_layer_|, and |right_layer_|. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 scoped_ptr<ImagePainter> bottom_painter_; | 217 scoped_ptr<ImagePainter> bottom_painter_; |
218 scoped_ptr<ImagePainter> bottom_right_painter_; | 218 scoped_ptr<ImagePainter> bottom_right_painter_; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(ImageGrid); | 220 DISALLOW_COPY_AND_ASSIGN(ImageGrid); |
221 }; | 221 }; |
222 | 222 |
223 } // namespace internal | 223 } // namespace internal |
224 } // namespace ash | 224 } // namespace ash |
225 | 225 |
226 #endif // ASH_WM_IMAGE_GRID_H_ | 226 #endif // ASH_WM_IMAGE_GRID_H_ |
OLD | NEW |