OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 BASE_GFX_POINT_H__ | 5 #ifndef BASE_GFX_POINT_H__ |
6 #define BASE_GFX_POINT_H__ | 6 #define BASE_GFX_POINT_H__ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #ifdef UNIT_TEST | |
11 #include <iostream> | 10 #include <iostream> |
12 #endif | |
13 | 11 |
14 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
15 typedef struct tagPOINT POINT; | 13 typedef struct tagPOINT POINT; |
16 #elif defined(OS_MACOSX) | 14 #elif defined(OS_MACOSX) |
17 #include <ApplicationServices/ApplicationServices.h> | 15 #include <ApplicationServices/ApplicationServices.h> |
18 #endif | 16 #endif |
19 | 17 |
20 namespace gfx { | 18 namespace gfx { |
21 | 19 |
22 // | 20 // |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 CGPoint ToCGPoint() const; | 62 CGPoint ToCGPoint() const; |
65 #endif | 63 #endif |
66 | 64 |
67 private: | 65 private: |
68 int x_; | 66 int x_; |
69 int y_; | 67 int y_; |
70 }; | 68 }; |
71 | 69 |
72 } // namespace gfx | 70 } // namespace gfx |
73 | 71 |
74 #ifdef UNIT_TEST | |
75 | |
76 inline std::ostream& operator<<(std::ostream& out, const gfx::Point& p) { | 72 inline std::ostream& operator<<(std::ostream& out, const gfx::Point& p) { |
77 return out << p.x() << "," << p.y(); | 73 return out << p.x() << "," << p.y(); |
78 } | 74 } |
79 | 75 |
80 #endif // #ifdef UNIT_TEST | |
81 | |
82 #endif // BASE_GFX_POINT_H__ | 76 #endif // BASE_GFX_POINT_H__ |
83 | 77 |
OLD | NEW |