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

Unified Diff: gfx/size.h

Issue 6246027: Move src/gfx/ to src/ui/gfx... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gfx/scrollbar_size.cc ('k') | gfx/size.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gfx/size.h
===================================================================
--- gfx/size.h (revision 73487)
+++ gfx/size.h (working copy)
@@ -6,77 +6,7 @@
#define GFX_SIZE_H_
#pragma once
-#include "build/build_config.h"
+#include "ui/gfx/size.h"
+// TODO(sail): remove this file once all includes have been updated.
-#include <iosfwd>
-
-#if defined(OS_WIN)
-typedef struct tagSIZE SIZE;
-#elif defined(OS_MACOSX)
-#include <ApplicationServices/ApplicationServices.h>
-#endif
-
-namespace gfx {
-
-// A size has width and height values.
-class Size {
- public:
- Size() : width_(0), height_(0) {}
- Size(int width, int height);
-#if defined(OS_MACOSX)
- explicit Size(const CGSize& s);
-#endif
-
- ~Size() {}
-
-#if defined(OS_MACOSX)
- Size& operator=(const CGSize& s);
-#endif
-
- int width() const { return width_; }
- int height() const { return height_; }
-
- int GetArea() const { return width_ * height_; }
-
- void SetSize(int width, int height) {
- set_width(width);
- set_height(height);
- }
-
- void Enlarge(int width, int height) {
- set_width(width_ + width);
- set_height(height_ + height);
- }
-
- void set_width(int width);
- void set_height(int height);
-
- bool operator==(const Size& s) const {
- return width_ == s.width_ && height_ == s.height_;
- }
-
- bool operator!=(const Size& s) const {
- return !(*this == s);
- }
-
- bool IsEmpty() const {
- // Size doesn't allow negative dimensions, so testing for 0 is enough.
- return (width_ == 0) || (height_ == 0);
- }
-
-#if defined(OS_WIN)
- SIZE ToSIZE() const;
-#elif defined(OS_MACOSX)
- CGSize ToCGSize() const;
-#endif
-
- private:
- int width_;
- int height_;
-};
-
-std::ostream& operator<<(std::ostream& out, const gfx::Size& s);
-
-} // namespace gfx
-
#endif // GFX_SIZE_H_
« no previous file with comments | « gfx/scrollbar_size.cc ('k') | gfx/size.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698