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

Unified Diff: ui/gfx/size.h

Issue 109433013: Move geometric types to a separate, more lightweight target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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
Index: ui/gfx/size.h
diff --git a/ui/gfx/size.h b/ui/gfx/size.h
index c96f5897f3b72d82770668dcc6828f17da4ce2ce..78457d5088de7349aca2e6a30dbe328c76d01ae6 100644
--- a/ui/gfx/size.h
+++ b/ui/gfx/size.h
@@ -1,67 +1,7 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef UI_GFX_SIZE_H_
-#define UI_GFX_SIZE_H_
+// TODO(beng): remove once callsites are patched.
+#include "ui/gfx/geometry/size.h"
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "ui/gfx/gfx_export.h"
-#include "ui/gfx/size_base.h"
-#include "ui/gfx/size_f.h"
-
-#if defined(OS_WIN)
-typedef struct tagSIZE SIZE;
-#elif defined(OS_IOS)
-#include <CoreGraphics/CoreGraphics.h>
-#elif defined(OS_MACOSX)
-#include <ApplicationServices/ApplicationServices.h>
-#endif
-
-namespace gfx {
-
-// A size has width and height values.
-class GFX_EXPORT Size : public SizeBase<Size, int> {
- public:
- Size() : SizeBase<Size, int>(0, 0) {}
- Size(int width, int height) : SizeBase<Size, int>(width, height) {}
-#if defined(OS_MACOSX)
- explicit Size(const CGSize& s);
-#endif
-
- ~Size() {}
-
-#if defined(OS_MACOSX)
- Size& operator=(const CGSize& s);
-#endif
-
-#if defined(OS_WIN)
- SIZE ToSIZE() const;
-#elif defined(OS_MACOSX)
- CGSize ToCGSize() const;
-#endif
-
- operator SizeF() const {
- return SizeF(width(), height());
- }
-
- std::string ToString() const;
-};
-
-inline bool operator==(const Size& lhs, const Size& rhs) {
- return lhs.width() == rhs.width() && lhs.height() == rhs.height();
-}
-
-inline bool operator!=(const Size& lhs, const Size& rhs) {
- return !(lhs == rhs);
-}
-
-#if !defined(COMPILER_MSVC)
-extern template class SizeBase<Size, int>;
-#endif
-
-} // namespace gfx
-
-#endif // UI_GFX_SIZE_H_

Powered by Google App Engine
This is Rietveld 408576698