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

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

Issue 9616037: Change panel drag related methods to use mouse location in screen coordinates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to reland Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_UTILS_COCOA_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_UTILS_COCOA_H_
7 #pragma once
8
9 #import <Cocoa/Cocoa.h>
10 #include "ui/gfx/point.h"
11 #include "ui/gfx/rect.h"
12
13 namespace cocoa_utils {
14
15 // TODO(dcheng): Move elsewhere so BrowserWindowCocoa can use them too.
16 // Converts a rect from the platfrom-independent screen coordinates (with the
17 // (0,0) in the top-left corner of the primary screen) to the Cocoa screen
18 // coordinates (with (0,0) in the low-left corner).
19 NSRect ConvertRectToCocoaCoordinates(const gfx::Rect& bounds);
20
21 // Converts a point from the platfrom-independent screen coordinates (with the
22 // (0,0) in the top-left corner of the primary screen) to the Cocoa screen
23 // coordinates (with (0,0) in the low-left corner).
24 NSPoint ConvertPointToCocoaCoordinates(const gfx::Point& point);
25
26 // Converts a point from the Cocoa screen coordinates (with (0,0) in the
27 // low-left corner of the primary screen) to the platfrom-independent screen
28 // coordinates (with the (0,0) in the top-left corner).
29 gfx::Point ConvertPointFromCocoaCoordinates(NSPoint point);
30
31 } // namespace cocoa_utils
32
33 #endif // CHROME_BROWSER_UI_PANELS_PANEL_UTILS_COCOA_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm ('k') | chrome/browser/ui/panels/panel_utils_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698