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

Side by Side Diff: ui/gfx/size_base.h

Issue 23498059: Remove last dependencies on ui/base from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: last rebase Created 7 years, 2 months 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/gfx/size.h ('k') | ui/gfx/size_conversions.h » ('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 UI_GFX_SIZE_BASE_H_ 5 #ifndef UI_GFX_SIZE_BASE_H_
6 #define UI_GFX_SIZE_BASE_H_ 6 #define UI_GFX_SIZE_BASE_H_
7 7
8 #include "ui/gfx/gfx_export.h" 8 #include "ui/gfx/gfx_export.h"
9 9
10 namespace gfx { 10 namespace gfx {
11 11
12 // A size has width and height values. 12 // A size has width and height values.
13 template<typename Class, typename Type> 13 template<typename Class, typename Type>
14 class UI_EXPORT SizeBase { 14 class GFX_EXPORT SizeBase {
15 public: 15 public:
16 Type width() const { return width_; } 16 Type width() const { return width_; }
17 Type height() const { return height_; } 17 Type height() const { return height_; }
18 18
19 Type GetArea() const { return width_ * height_; } 19 Type GetArea() const { return width_ * height_; }
20 20
21 void SetSize(Type width, Type height) { 21 void SetSize(Type width, Type height) {
22 set_width(width); 22 set_width(width);
23 set_height(height); 23 set_height(height);
24 } 24 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 ~SizeBase() {} 60 ~SizeBase() {}
61 61
62 private: 62 private:
63 Type width_; 63 Type width_;
64 Type height_; 64 Type height_;
65 }; 65 };
66 66
67 } // namespace gfx 67 } // namespace gfx
68 68
69 #endif // UI_GFX_SIZE_BASE_H_ 69 #endif // UI_GFX_SIZE_BASE_H_
OLDNEW
« no previous file with comments | « ui/gfx/size.h ('k') | ui/gfx/size_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698