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

Side by Side Diff: cc/stubs/int_size.h

Issue 11275113: Remove most remaining references to IntRect and FloatRect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compositor bindings 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 | « cc/stubs/float_size.h ('k') | cc/test/layer_test_common.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 #ifndef CC_STUBS_INTSIZE_H_ 5 #ifndef CC_STUBS_INTSIZE_H_
6 #define CC_STUBS_INTSIZE_H_ 6 #define CC_STUBS_INTSIZE_H_
7 7
8 #if INSIDE_WEBKIT_BUILD 8 #if INSIDE_WEBKIT_BUILD
9 #include "Source/WebCore/platform/graphics/IntSize.h" 9 #include "Source/WebCore/platform/graphics/IntSize.h"
10 #else 10 #else
11 #include "third_party/WebKit/Source/WebCore/platform/graphics/IntSize.h" 11 #include "third_party/WebKit/Source/WebCore/platform/graphics/IntSize.h"
12 #endif 12 #endif
13 #include "ui/gfx/size.h" 13 #include "ui/gfx/size.h"
14 #include "ui/gfx/vector2d.h"
14 15
15 namespace cc { 16 namespace cc {
16 17
17 class IntSize : public WebCore::IntSize { 18 class IntSize : public WebCore::IntSize {
18 public: 19 public:
19 IntSize() { } 20 IntSize() { }
20 21
21 IntSize(int width, int height) 22 IntSize(int width, int height)
22 : WebCore::IntSize(width, height) 23 : WebCore::IntSize(width, height)
23 { 24 {
24 } 25 }
25 26
26 IntSize(WebCore::IntSize size) 27 IntSize(WebCore::IntSize size)
27 : WebCore::IntSize(size.width(), size.height()) 28 : WebCore::IntSize(size.width(), size.height())
28 { 29 {
29 30
30 } 31 }
31 32
32 explicit IntSize(gfx::Size size) 33 explicit IntSize(gfx::Size size)
33 : WebCore::IntSize(size.width(), size.height()) 34 : WebCore::IntSize(size.width(), size.height())
34 { 35 {
35 } 36 }
36 37
38 explicit IntSize(gfx::Vector2d vector)
39 : WebCore::IntSize(vector.x(), vector.y())
40 {
41 }
42
37 operator gfx::Size() const { return gfx::Size(width(), height()); } 43 operator gfx::Size() const { return gfx::Size(width(), height()); }
44
45 operator gfx::Vector2d() const { return gfx::Vector2d(width(), height()); }
38 }; 46 };
39 47
40 } 48 }
41 49
42 #endif 50 #endif
OLDNEW
« no previous file with comments | « cc/stubs/float_size.h ('k') | cc/test/layer_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698