| 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_VIEWS_COREWM_IMAGE_GRID_H_ | 5 #ifndef UI_WM_CORE_IMAGE_GRID_H_ |
| 6 #define UI_VIEWS_COREWM_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" |
| 11 #include "ui/compositor/layer.h" | 11 #include "ui/compositor/layer.h" |
| 12 #include "ui/compositor/layer_delegate.h" | 12 #include "ui/compositor/layer_delegate.h" |
| 13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
| 14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
| 15 #include "ui/views/views_export.h" | 15 #include "ui/wm/core/wm_core_export.h" |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Image; | 18 class Image; |
| 19 } // namespace gfx | 19 } // namespace gfx |
| 20 | 20 |
| 21 namespace views { | 21 namespace views { |
| 22 namespace corewm { | 22 namespace corewm { |
| 23 | 23 |
| 24 // An ImageGrid is a 3x3 array of ui::Layers, each containing an image. | 24 // An ImageGrid is a 3x3 array of ui::Layers, each containing an image. |
| 25 // | 25 // |
| (...skipping 24 matching lines...) Expand all Loading... |
| 50 // | ..xxx|XXXXXXXXXXXXXXXXXX | 50 // | ..xxx|XXXXXXXXXXXXXXXXXX |
| 51 // | .xXXXXX|XXXXXXXXXXXXXXXXXX_____ | 51 // | .xXXXXX|XXXXXXXXXXXXXXXXXX_____ |
| 52 // | .xXX | ^ window's top edge | 52 // | .xXX | ^ window's top edge |
| 53 // | .xXX | | 53 // | .xXX | |
| 54 // +---------+ | 54 // +---------+ |
| 55 // | xXX| | 55 // | xXX| |
| 56 // | xXX|< window's left edge | 56 // | xXX|< window's left edge |
| 57 // | xXX| | 57 // | xXX| |
| 58 // ... | 58 // ... |
| 59 // | 59 // |
| 60 class VIEWS_EXPORT ImageGrid { | 60 class WM_CORE_EXPORT ImageGrid { |
| 61 public: | 61 public: |
| 62 // Helper class for use by tests. | 62 // Helper class for use by tests. |
| 63 class VIEWS_EXPORT TestAPI { | 63 class WM_CORE_EXPORT TestAPI { |
| 64 public: | 64 public: |
| 65 TestAPI(ImageGrid* grid) : grid_(grid) {} | 65 TestAPI(ImageGrid* grid) : grid_(grid) {} |
| 66 | 66 |
| 67 gfx::Rect top_left_clip_rect() const { | 67 gfx::Rect top_left_clip_rect() const { |
| 68 return grid_->top_left_painter_->clip_rect_; | 68 return grid_->top_left_painter_->clip_rect_; |
| 69 } | 69 } |
| 70 gfx::Rect top_right_clip_rect() const { | 70 gfx::Rect top_right_clip_rect() const { |
| 71 return grid_->top_right_painter_->clip_rect_; | 71 return grid_->top_right_painter_->clip_rect_; |
| 72 } | 72 } |
| 73 gfx::Rect bottom_left_clip_rect() const { | 73 gfx::Rect bottom_left_clip_rect() const { |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 scoped_ptr<ImagePainter> bottom_left_painter_; | 218 scoped_ptr<ImagePainter> bottom_left_painter_; |
| 219 scoped_ptr<ImagePainter> bottom_painter_; | 219 scoped_ptr<ImagePainter> bottom_painter_; |
| 220 scoped_ptr<ImagePainter> bottom_right_painter_; | 220 scoped_ptr<ImagePainter> bottom_right_painter_; |
| 221 | 221 |
| 222 DISALLOW_COPY_AND_ASSIGN(ImageGrid); | 222 DISALLOW_COPY_AND_ASSIGN(ImageGrid); |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 } // namespace corewm | 225 } // namespace corewm |
| 226 } // namespace views | 226 } // namespace views |
| 227 | 227 |
| 228 #endif // UI_VIEWS_COREWM_IMAGE_GRID_H_ | 228 #endif // UI_WM_CORE_IMAGE_GRID_H_ |
| OLD | NEW |