Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_GFX_POINT_H_ | 5 #ifndef UI_GFX_POINT_H_ |
| 6 #define UI_GFX_POINT_H_ | 6 #define UI_GFX_POINT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/base/ui_export.h" | 9 #include "ui/base/ui_export.h" |
| 10 #include "ui/gfx/point_base.h" | 10 #include "ui/gfx/point_base.h" |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 // |point| is a DWORD value that contains a coordinate. The x-coordinate is | 27 // |point| is a DWORD value that contains a coordinate. The x-coordinate is |
| 28 // the low-order short and the y-coordinate is the high-order short. This | 28 // the low-order short and the y-coordinate is the high-order short. This |
| 29 // value is commonly acquired from GetMessagePos/GetCursorPos. | 29 // value is commonly acquired from GetMessagePos/GetCursorPos. |
| 30 explicit Point(DWORD point); | 30 explicit Point(DWORD point); |
| 31 explicit Point(const POINT& point); | 31 explicit Point(const POINT& point); |
| 32 Point& operator=(const POINT& point); | 32 Point& operator=(const POINT& point); |
| 33 #elif defined(OS_MACOSX) | 33 #elif defined(OS_MACOSX) |
| 34 explicit Point(const CGPoint& point); | 34 explicit Point(const CGPoint& point); |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 virtual ~Point() {} | 37 ~Point() {} |
|
sky
2012/04/24 17:41:14
Move the destructors to be protected so we know no
jbates
2012/04/24 17:44:47
The PointBase destructor is protected. Might be he
oshima
2012/04/24 17:54:10
Yes, this dtor needs to be still public. All base
| |
| 38 | 38 |
| 39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 40 POINT ToPOINT() const; | 40 POINT ToPOINT() const; |
| 41 #elif defined(OS_MACOSX) | 41 #elif defined(OS_MACOSX) |
| 42 CGPoint ToCGPoint() const; | 42 CGPoint ToCGPoint() const; |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 // Returns a string representation of point. | 45 // Returns a string representation of point. |
| 46 std::string ToString() const; | 46 std::string ToString() const; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace gfx | 49 } // namespace gfx |
| 50 | 50 |
| 51 #endif // UI_GFX_POINT_H_ | 51 #endif // UI_GFX_POINT_H_ |
| OLD | NEW |