Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: ui/views/corewm/image_grid.cc

Issue 11275296: Move shadow code to views\corewm (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/corewm/image_grid.h ('k') | ui/views/corewm/image_grid_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/wm/image_grid.h" 5 #include "ui/views/corewm/image_grid.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "third_party/skia/include/core/SkXfermode.h" 10 #include "third_party/skia/include/core/SkXfermode.h"
11 #include "ui/gfx/canvas.h" 11 #include "ui/gfx/canvas.h"
12 #include "ui/gfx/image/image.h" 12 #include "ui/gfx/image/image.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 #include "ui/gfx/rect_conversions.h" 14 #include "ui/gfx/rect_conversions.h"
15 #include "ui/gfx/transform.h" 15 #include "ui/gfx/transform.h"
16 16
17 using std::max; 17 using std::max;
18 using std::min; 18 using std::min;
19 19
20 namespace ash { 20 namespace views {
21 namespace internal { 21 namespace corewm {
22 22
23 gfx::RectF ImageGrid::TestAPI::GetTransformedLayerBounds( 23 gfx::RectF ImageGrid::TestAPI::GetTransformedLayerBounds(
24 const ui::Layer& layer) { 24 const ui::Layer& layer) {
25 gfx::RectF bounds = layer.bounds(); 25 gfx::RectF bounds = layer.bounds();
26 layer.transform().TransformRect(&bounds); 26 layer.transform().TransformRect(&bounds);
27 return bounds; 27 return bounds;
28 } 28 }
29 29
30 ImageGrid::ImageGrid() 30 ImageGrid::ImageGrid()
31 : layer_(new ui::Layer(ui::LAYER_NOT_DRAWN)), 31 : layer_(new ui::Layer(ui::LAYER_NOT_DRAWN)),
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 const gfx::Size size = GetImageSize(image); 273 const gfx::Size size = GetImageSize(image);
274 layer_ptr->get()->SetBounds(gfx::Rect(0, 0, size.width(), size.height())); 274 layer_ptr->get()->SetBounds(gfx::Rect(0, 0, size.width(), size.height()));
275 275
276 painter_ptr->reset(new ImagePainter(image)); 276 painter_ptr->reset(new ImagePainter(image));
277 layer_ptr->get()->set_delegate(painter_ptr->get()); 277 layer_ptr->get()->set_delegate(painter_ptr->get());
278 layer_ptr->get()->SetFillsBoundsOpaquely(false); 278 layer_ptr->get()->SetFillsBoundsOpaquely(false);
279 layer_ptr->get()->SetVisible(true); 279 layer_ptr->get()->SetVisible(true);
280 layer_->Add(layer_ptr->get()); 280 layer_->Add(layer_ptr->get());
281 } 281 }
282 282
283 } // namespace internal 283 } // namespace corewm
284 } // namespace ash 284 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/image_grid.h ('k') | ui/views/corewm/image_grid_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698