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

Unified Diff: ui/gfx/size_f.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_f.h
diff --git a/ui/gfx/size_f.h b/ui/gfx/size_f.h
index b9065273c8ed041e0fcb48c86cc5c7a05c4f5b41..0aabbcfcd53aa0a3ffdd6ed8865fee06b9f59d4d 100644
--- a/ui/gfx/size_f.h
+++ b/ui/gfx/size_f.h
@@ -1,54 +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_F_H_
-#define UI_GFX_SIZE_F_H_
+// TODO(beng): remove once callsites are patched.
+#include "ui/gfx/geometry/size_f.h"
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "ui/gfx/gfx_export.h"
-#include "ui/gfx/size_base.h"
-
-namespace gfx {
-
-// A floating version of gfx::Size.
-class GFX_EXPORT SizeF : public SizeBase<SizeF, float> {
- public:
- SizeF() : SizeBase<SizeF, float>(0, 0) {}
- SizeF(float width, float height) : SizeBase<SizeF, float>(width, height) {}
- ~SizeF() {}
-
- void Scale(float scale) {
- Scale(scale, scale);
- }
-
- void Scale(float x_scale, float y_scale) {
- SetSize(width() * x_scale, height() * y_scale);
- }
-
- std::string ToString() const;
-};
-
-inline bool operator==(const SizeF& lhs, const SizeF& rhs) {
- return lhs.width() == rhs.width() && lhs.height() == rhs.height();
-}
-
-inline bool operator!=(const SizeF& lhs, const SizeF& rhs) {
- return !(lhs == rhs);
-}
-
-GFX_EXPORT SizeF ScaleSize(const SizeF& p, float x_scale, float y_scale);
-
-inline SizeF ScaleSize(const SizeF& p, float scale) {
- return ScaleSize(p, scale, scale);
-}
-
-#if !defined(COMPILER_MSVC)
-extern template class SizeBase<SizeF, float>;
-#endif
-
-} // namespace gfx
-
-#endif // UI_GFX_SIZE_F_H_
« ui/aura/aura.gyp ('K') | « ui/gfx/size_conversions.cc ('k') | ui/gfx/size_f.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698