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

Side by Side Diff: ui/gfx/point.h

Issue 10203004: no virtual destructor for point/size/rect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/point_base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/point_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698