summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dock_info.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 22:38:49 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 22:38:49 +0000
commite00e0cc2284c3a8e0b74841ace6b9dad9bd1df94 (patch)
tree1b7b1b2beaac958b7dc7140c5ac47f1980e1b509 /chrome/browser/dock_info.h
parent50e97a860bc60d35b455e674303c6ca247a03383 (diff)
downloadchromium_src-e00e0cc2284c3a8e0b74841ace6b9dad9bd1df94.zip
chromium_src-e00e0cc2284c3a8e0b74841ace6b9dad9bd1df94.tar.gz
chromium_src-e00e0cc2284c3a8e0b74841ace6b9dad9bd1df94.tar.bz2
Changes docking in the following ways:
. Dock icons for window docking positions could go offscreen before. . It was possible to show the maximize indicator on the wrong screen. This was because equals was not comparing the monitor bounds. . Tweaks to color, size and animation from Glen. BUG=none TEST=make sure there are no bugs with docking tabs. Review URL: http://codereview.chromium.org/42041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dock_info.h')
-rw-r--r--chrome/browser/dock_info.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/chrome/browser/dock_info.h b/chrome/browser/dock_info.h
index ee8c61b..dd94563 100644
--- a/chrome/browser/dock_info.h
+++ b/chrome/browser/dock_info.h
@@ -48,6 +48,10 @@ class DockInfo {
DockInfo() : type_(NONE), hwnd_(NULL), in_enable_area_(false) {}
+ // Size of the popup window shown to indicate a valid dock location.
+ static int popup_width();
+ static int popup_height();
+
// Returns the DockInfo for the specified point |screen_point|. |ignore|
// contains the set of hwnds to ignore from consideration. This contains the
// dragged window as well as any windows showing possible dock locations.
@@ -98,6 +102,9 @@ class DockInfo {
}
const gfx::Rect& monitor_bounds() const { return monitor_bounds_; }
+ // Returns the bounds of the window to show the indicator for.
+ gfx::Rect GetPopupRect() const;
+
// Returns true if the drop should result in docking. DockInfo maintains two
// states (as indicated by this boolean):
// 1. The mouse is close enough to the hot spot such that a visual indicator
@@ -114,15 +121,14 @@ class DockInfo {
// Returns true if |other| is considered equal to this. Two DockInfos are
// considered equal if they have the same type and same hwnd.
bool equals(const DockInfo& other) const {
- return type_ == other.type_ && hwnd_ == other.hwnd_;
+ return type_ == other.type_ && hwnd_ == other.hwnd_ &&
+ monitor_bounds_ == other.monitor_bounds_;
}
// If screen_loc is close enough to the hot spot given by |x| and |y|, the
// type and hot_spot are set from the supplied parameters. This is used
- // internally, there is no need to invoke this otherwise. |monitor| gives the
- // monitor the location is on.
- bool CheckMonitorPoint(HMONITOR monitor,
- const gfx::Point& screen_loc,
+ // internally, there is no need to invoke this otherwise.
+ bool CheckMonitorPoint(const gfx::Point& screen_loc,
int x,
int y,
Type type);