diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 23:03:14 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 23:03:14 +0000 |
commit | b39b708246bd53c09e4fea01dac923d742c303e0 (patch) | |
tree | e127360cb5770501bca3e62a079853708ae52be4 /chrome/common/owned_widget_gtk.h | |
parent | be930259c6ff84c0211298c0cdeecbf5d4863850 (diff) | |
download | chromium_src-b39b708246bd53c09e4fea01dac923d742c303e0.zip chromium_src-b39b708246bd53c09e4fea01dac923d742c303e0.tar.gz chromium_src-b39b708246bd53c09e4fea01dac923d742c303e0.tar.bz2 |
Implement and use the -> operator for OwnedWidgetGtk.
Also change dragged_tabs_gtk's container_ to be a OwnedWidgetGtk just to be on the safe side.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/119221
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17790 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/owned_widget_gtk.h')
-rw-r--r-- | chrome/common/owned_widget_gtk.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/common/owned_widget_gtk.h b/chrome/common/owned_widget_gtk.h index 46d3996..72fadd5 100644 --- a/chrome/common/owned_widget_gtk.h +++ b/chrome/common/owned_widget_gtk.h @@ -46,8 +46,8 @@ // gtk_destroy_widget(widget); // Ask all code to destroy their references. // g_object_unref(widget); // Destroy the initial reference we had claimed. -#ifndef BASE_OWNED_WIDGET_GTK_H_ -#define BASE_OWNED_WIDGET_GTK_H_ +#ifndef CHROME_COMMON_OWNED_WIDGET_GTK_H_ +#define CHROME_COMMON_OWNED_WIDGET_GTK_H_ #include "base/basictypes.h" @@ -64,6 +64,7 @@ class OwnedWidgetGtk { // Return the currently owned widget, or NULL if no widget is owned. GtkWidget* get() const { return widget_; } + GtkWidget* operator->() const { return widget_; } // Takes ownership of a widget, by taking the initial floating reference of // the GtkWidget. It is expected that Own() is called right after the widget @@ -85,4 +86,4 @@ class OwnedWidgetGtk { DISALLOW_COPY_AND_ASSIGN(OwnedWidgetGtk); }; -#endif // BASE_OWNED_WIDGET_GTK_H_ +#endif // CHROME_COMMON_OWNED_WIDGET_GTK_H_ |