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

Side by Side Diff: chrome/browser/ui/cocoa/panels/panel_utils_cocoa.h

Issue 23918002: Switch to doing user-resizing via system for panels on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 7 years, 3 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
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 CHROME_BROWSER_UI_COCOA_PANELS_PANEL_UTILS_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_PANELS_PANEL_UTILS_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_PANELS_PANEL_UTILS_COCOA_H_ 6 #define CHROME_BROWSER_UI_COCOA_PANELS_PANEL_UTILS_COCOA_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include "ui/gfx/point.h" 9 #include "ui/gfx/point.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
11 11
12 namespace cocoa_utils { 12 namespace cocoa_utils {
13 13
14 // TODO(dcheng): Move elsewhere so BrowserWindowCocoa can use them too. 14 // TODO(dcheng): Move elsewhere so BrowserWindowCocoa can use them too.
15 // Converts a rect from the platfrom-independent screen coordinates (with the 15 // Converts a rect from the platfrom-independent screen coordinates (with the
16 // (0,0) in the top-left corner of the primary screen) to the Cocoa screen 16 // (0,0) in the top-left corner of the primary screen) to the Cocoa screen
17 // coordinates (with (0,0) in the low-left corner). 17 // coordinates (with (0,0) in the low-left corner).
18 NSRect ConvertRectToCocoaCoordinates(const gfx::Rect& bounds); 18 NSRect ConvertRectToCocoaCoordinates(const gfx::Rect& bounds);
19 19
20 // Converts a rect from the Cocoa screen oordinates (with (0,0) in the low-left
21 // corner) to the platfrom-independent screen coordinates.
Dmitry Titov 2013/09/05 20:49:59 typo: platfrom could you add at the end: "with the
22 gfx::Rect ConvertRectFromCocoaCoordinates(NSRect bounds);
23
20 // Converts a point from the platfrom-independent screen coordinates (with the 24 // Converts a point from the platfrom-independent screen coordinates (with the
21 // (0,0) in the top-left corner of the primary screen) to the Cocoa screen 25 // (0,0) in the top-left corner of the primary screen) to the Cocoa screen
22 // coordinates (with (0,0) in the low-left corner). 26 // coordinates (with (0,0) in the low-left corner).
23 NSPoint ConvertPointToCocoaCoordinates(const gfx::Point& point); 27 NSPoint ConvertPointToCocoaCoordinates(const gfx::Point& point);
24 28
25 // Converts a point from the Cocoa screen coordinates (with (0,0) in the 29 // Converts a point from the Cocoa screen coordinates (with (0,0) in the
26 // low-left corner of the primary screen) to the platfrom-independent screen 30 // low-left corner of the primary screen) to the platfrom-independent screen
27 // coordinates (with the (0,0) in the top-left corner). 31 // coordinates (with the (0,0) in the top-left corner).
28 gfx::Point ConvertPointFromCocoaCoordinates(NSPoint point); 32 gfx::Point ConvertPointFromCocoaCoordinates(NSPoint point);
29 33
30 } // namespace cocoa_utils 34 } // namespace cocoa_utils
31 35
32 #endif // CHROME_BROWSER_UI_COCOA_PANELS_PANEL_UTILS_COCOA_H_ 36 #endif // CHROME_BROWSER_UI_COCOA_PANELS_PANEL_UTILS_COCOA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/panels/panel_cocoa.mm ('k') | chrome/browser/ui/cocoa/panels/panel_utils_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698