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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/panels/panel_utils_cocoa.h
diff --git a/chrome/browser/ui/panels/panel_utils_cocoa.h b/chrome/browser/ui/panels/panel_utils_cocoa.h
new file mode 100644
index 0000000000000000000000000000000000000000..47a186bf75f3c3baadbf4fa1059d3babe3e32595
--- /dev/null
+++ b/chrome/browser/ui/panels/panel_utils_cocoa.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_PANELS_PANEL_UTILS_COCOA_H_
+#define CHROME_BROWSER_UI_PANELS_PANEL_UTILS_COCOA_H_
+#pragma once
+
+#import <Cocoa/Cocoa.h>
+#include "ui/gfx/point.h"
+#include "ui/gfx/rect.h"
+
+namespace cocoa_utils {
+
+// TODO(dcheng): Move elsewhere so BrowserWindowCocoa can use them too.
+// Converts a rect from the platfrom-independent screen coordinates (with the
+// (0,0) in the top-left corner of the primary screen) to the Cocoa screen
+// coordinates (with (0,0) in the low-left corner).
+NSRect ConvertRectToCocoaCoordinates(const gfx::Rect& bounds);
+
+// Converts a point from the platfrom-independent screen coordinates (with the
+// (0,0) in the top-left corner of the primary screen) to the Cocoa screen
+// coordinates (with (0,0) in the low-left corner).
+NSPoint ConvertPointToCocoaCoordinates(const gfx::Point& point);
+
+// Converts a point from the Cocoa screen coordinates (with (0,0) in the
+// low-left corner of the primary screen) to the platfrom-independent screen
+// coordinates (with the (0,0) in the top-left corner).
+gfx::Point ConvertPointFromCocoaCoordinates(NSPoint point);
+
+} // namespace cocoa_utils
+
+#endif // CHROME_BROWSER_UI_PANELS_PANEL_UTILS_COCOA_H_
« 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