diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-05 20:27:00 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-05 20:27:00 +0000 |
commit | c12fac94defb54d0a16ca2e1a27fc4023a1acba7 (patch) | |
tree | ec653aa7163c77d08d6333a5e83d0a9c7dce12c4 /chrome/browser/gtk/custom_button.h | |
parent | 6cf2af2efbde465c5ce6c90bd141056ed78ba335 (diff) | |
download | chromium_src-c12fac94defb54d0a16ca2e1a27fc4023a1acba7.zip chromium_src-c12fac94defb54d0a16ca2e1a27fc4023a1acba7.tar.gz chromium_src-c12fac94defb54d0a16ca2e1a27fc4023a1acba7.tar.bz2 |
Implement Linux tabs as widgets. This moves tab input handling into the correct object. This change also adds an initial DraggedTabControllerGtk.
Review URL: http://codereview.chromium.org/99371
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15330 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/custom_button.h')
-rw-r--r-- | chrome/browser/gtk/custom_button.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/gtk/custom_button.h b/chrome/browser/gtk/custom_button.h index aea7717..f5e21ce 100644 --- a/chrome/browser/gtk/custom_button.h +++ b/chrome/browser/gtk/custom_button.h @@ -9,6 +9,7 @@ #include <string> +#include "base/gfx/rect.h" #include "base/scoped_ptr.h" #include "chrome/common/owned_widget_gtk.h" @@ -55,6 +56,15 @@ class CustomDrawButton { GtkWidget* widget() const { return widget_.get(); } + gfx::Rect bounds() const { + return gfx::Rect(widget_.get()->allocation.x, + widget_.get()->allocation.y, + widget_.get()->allocation.width, + widget_.get()->allocation.height); + } + + int width() const { return widget_.get()->allocation.width; } + // This is a convenience function for creating a widget that closes // a bar (find bar, download shelf, info bars). The button will be packed in // |hbox|. |