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

Unified Diff: ui/gfx/geometry/rect.cc

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 years, 9 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 | « ui/gfx/geometry/rect.h ('k') | ui/gfx/geometry/rect_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/rect.cc
diff --git a/ui/gfx/geometry/rect.cc b/ui/gfx/geometry/rect.cc
index da860d08e760f73101710488c4317cd5d78f1cb5..caebc9df28d3ce64652f8c857b6a6de62c66035b 100644
--- a/ui/gfx/geometry/rect.cc
+++ b/ui/gfx/geometry/rect.cc
@@ -6,42 +6,12 @@
#include <algorithm>
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
#include "base/logging.h"
#include "base/strings/stringprintf.h"
#include "ui/gfx/geometry/insets.h"
namespace gfx {
-#if defined(OS_WIN)
-Rect::Rect(const RECT& r)
- : origin_(r.left, r.top),
- size_(std::abs(r.right - r.left), std::abs(r.bottom - r.top)) {
-}
-#elif defined(OS_MACOSX)
-Rect::Rect(const CGRect& r)
- : origin_(r.origin.x, r.origin.y), size_(r.size.width, r.size.height) {
-}
-#endif
-
-#if defined(OS_WIN)
-RECT Rect::ToRECT() const {
- RECT r;
- r.left = x();
- r.right = right();
- r.top = y();
- r.bottom = bottom();
- return r;
-}
-#elif defined(OS_MACOSX)
-CGRect Rect::ToCGRect() const {
- return CGRectMake(x(), y(), width(), height());
-}
-#endif
-
void AdjustAlongAxis(int dst_origin, int dst_size, int* origin, int* size) {
*size = std::min(dst_size, *size);
if (*origin < dst_origin)
« no previous file with comments | « ui/gfx/geometry/rect.h ('k') | ui/gfx/geometry/rect_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698