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

Unified Diff: chrome/browser/gtk/browser_window_gtk.h

Issue 140026: Add the ability to resize the window when over the custom frame. (Closed)
Patch Set: fix tab offset Created 11 years, 6 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
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.h ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/browser_window_gtk.h
diff --git a/chrome/browser/gtk/browser_window_gtk.h b/chrome/browser/gtk/browser_window_gtk.h
index 74b8dd6fafe2a3a98275c02c90f289e3fded7601..b3472885f8424166bcb3a713eb362715ef1ce768 100644
--- a/chrome/browser/gtk/browser_window_gtk.h
+++ b/chrome/browser/gtk/browser_window_gtk.h
@@ -127,6 +127,10 @@ class BrowserWindowGtk : public BrowserWindow,
// close.
void set_drag_active(bool drag_active) { drag_active_ = drag_active; }
+ // Reset the mouse cursor to the default cursor if it was set to something
+ // else for the custom frame.
+ void ResetCustomFrameCursor();
+
// Returns the BrowserWindowGtk registered with |window|.
static BrowserWindowGtk* GetBrowserWindowForNativeWindow(
gfx::NativeWindow window);
@@ -205,6 +209,14 @@ class BrowserWindowGtk : public BrowserWindow,
GdkModifierType modifier,
BrowserWindowGtk* browser_window);
+ // Mouse move and mouse button press callbacks.
+ static gboolean OnMouseMoveEvent(GtkWidget* widget,
+ GdkEventMotion* event,
+ BrowserWindowGtk* browser);
+ static gboolean OnButtonPressEvent(GtkWidget* widget,
+ GdkEventButton* event,
+ BrowserWindowGtk* browser);
+
// Maps and Unmaps the xid of |widget| to |window|.
static void MainWindowMapped(GtkWidget* widget, BrowserWindowGtk* window);
static void MainWindowUnMapped(GtkWidget* widget, BrowserWindowGtk* window);
@@ -227,6 +239,11 @@ class BrowserWindowGtk : public BrowserWindow,
bool IsToolbarSupported();
bool IsBookmarkBarSupported();
+ // Checks to see if the mouse pointer at |x|, |y| is over the border of the
+ // custom frame (a spot that should trigger a window resize). Returns true if
+ // it should and sets |edge|.
+ bool GetWindowEdge(int x, int y, GdkWindowEdge* edge);
+
NotificationRegistrar registrar_;
gfx::Rect bounds_;
@@ -272,6 +289,10 @@ class BrowserWindowGtk : public BrowserWindow,
// A map which translates an X Window ID into its respective GtkWindow.
static std::map<XID, GtkWindow*> xid_map_;
+ // The current window cursor. We set it to a resize cursor when over the
+ // custom frame border. We set it to NULL if we want the default cursor.
+ GdkCursor* frame_cursor_;
+
DISALLOW_COPY_AND_ASSIGN(BrowserWindowGtk);
};
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.h ('k') | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698