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

Unified Diff: chrome/browser/ui/gtk/browser_titlebar.h

Issue 7206036: Titlebar modifications for panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review feedback. Created 9 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 | « no previous file | chrome/browser/ui/gtk/browser_titlebar.cc » ('j') | chrome/browser/ui/gtk/browser_titlebar.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/browser_titlebar.h
diff --git a/chrome/browser/ui/gtk/browser_titlebar.h b/chrome/browser/ui/gtk/browser_titlebar.h
index b7e982c2967d62b74fe312657dc74ed891d05ca6..7485d0ce2580ac07c1d4cbc339702e5f7576e665 100644
--- a/chrome/browser/ui/gtk/browser_titlebar.h
+++ b/chrome/browser/ui/gtk/browser_titlebar.h
@@ -109,7 +109,7 @@ class BrowserTitlebar : public NotificationObserver,
// the button into, and a tooltip id (IDS_).
CustomDrawButton* BuildTitlebarButton(int image, int image_pressed,
int image_hot, GtkWidget* box,
- int tooltip);
+ bool start, int tooltip);
// Update the titlebar spacing based on the custom frame and maximized state.
void UpdateTitlebarAlignment();
@@ -138,6 +138,12 @@ class BrowserTitlebar : public NotificationObserver,
CHROMEGTK_CALLBACK_1(BrowserTitlebar, gboolean, OnScroll,
GdkEventScroll*);
+ // Callbacks for mouse enter leave events.
+ CHROMEGTK_CALLBACK_1(BrowserTitlebar, gboolean, OnEnterNotify,
+ GdkEventCrossing*);
+ CHROMEGTK_CALLBACK_1(BrowserTitlebar, gboolean, OnLeaveNotify,
+ GdkEventCrossing*);
+
// Callback for min/max/close buttons.
CHROMEGTK_CALLBACK_0(BrowserTitlebar, void, OnButtonClicked);
@@ -162,6 +168,8 @@ class BrowserTitlebar : public NotificationObserver,
// Overriden from ActiveWindowWatcher::Observer.
virtual void ActiveWindowChanged(GdkWindow* active_window);
+ bool IsTypePanel();
+
// Pointers to the browser window that owns us and it's GtkWindow.
BrowserWindowGtk* browser_window_;
GtkWindow* window_;
@@ -202,6 +210,10 @@ class BrowserTitlebar : public NotificationObserver,
GtkWidget* app_mode_favicon_;
GtkWidget* app_mode_title_;
+ // Wrench icon for panels. This'll only appear when a panel window has focus
+ // or mouse is in a panel window.
+ scoped_ptr<CustomDrawButton> panel_wrench_button_;
+
// Whether we are using a custom frame.
bool using_custom_frame_;
@@ -209,6 +221,10 @@ class BrowserTitlebar : public NotificationObserver,
// value, so manually track the focus-in and focus-out events.)
bool window_has_focus_;
+ // Whether mouse is in the window. We show the wrench icon when a panel
+ // window has focus or mouse is in a panel window.
+ bool window_has_mouse_;
+
// We change the size of these three buttons when the window is maximized, so
// we use these structs to keep track of their original size.
GtkRequisition close_button_req_;
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/browser_titlebar.cc » ('j') | chrome/browser/ui/gtk/browser_titlebar.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698