diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-21 22:44:21 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-21 22:44:21 +0000 |
commit | 3b8a7f8e37e223f3cfbdb6893a3e372ba1e72bc2 (patch) | |
tree | dbcc9e25653efaa6d7b3fd0b646f56123f72f8f2 /views/widget/widget_gtk.cc | |
parent | 294b014b3743b8a359d423ab238d2ea2872cf629 (diff) | |
download | chromium_src-3b8a7f8e37e223f3cfbdb6893a3e372ba1e72bc2.zip chromium_src-3b8a7f8e37e223f3cfbdb6893a3e372ba1e72bc2.tar.gz chromium_src-3b8a7f8e37e223f3cfbdb6893a3e372ba1e72bc2.tar.bz2 |
Attempt 2 at:
Converts usage of SetProp/GetProp to a map. Even after making sure we
clean up props we still leak in a handful of cases that are causing
test grief. By and large our usage of properties is for inside the
application, so that a map works fine.
BUG=61528 44991
TEST=none
TBR=cpu@chromium.org
Review URL: http://codereview.chromium.org/5144005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/widget_gtk.cc')
-rw-r--r-- | views/widget/widget_gtk.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index 5dea13c..dcb6fb3 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -32,7 +32,6 @@ namespace { // g_object data keys to associate a WidgetGtk object to a GtkWidget. const char* kWidgetKey = "__VIEWS_WIDGET__"; -const wchar_t* kWidgetWideKey = L"__VIEWS_WIDGET__"; // A g_object data key to associate a CompositePainter object to a GtkWidget. const char* kCompositePainterKey = "__VIEWS_COMPOSITE_PAINTER__"; // A g_object data key to associate the flag whether or not the widget @@ -803,13 +802,12 @@ const Window* WidgetGtk::GetWindow() const { return GetWindowImpl(widget_); } -void WidgetGtk::SetNativeWindowProperty(const std::wstring& name, - void* value) { - g_object_set_data(G_OBJECT(widget_), WideToUTF8(name).c_str(), value); +void WidgetGtk::SetNativeWindowProperty(const char* name, void* value) { + g_object_set_data(G_OBJECT(widget_), name, value); } -void* WidgetGtk::GetNativeWindowProperty(const std::wstring& name) { - return g_object_get_data(G_OBJECT(widget_), WideToUTF8(name).c_str()); +void* WidgetGtk::GetNativeWindowProperty(const char* name) { + return g_object_get_data(G_OBJECT(widget_), name); } ThemeProvider* WidgetGtk::GetThemeProvider() const { @@ -1490,7 +1488,7 @@ void WidgetGtk::CreateGtkWidget(GtkWidget* parent, const gfx::Rect& bounds) { } // Setting the WidgetKey property to widget_, which is used by // GetWidgetFromNativeWindow. - SetNativeWindowProperty(kWidgetWideKey, this); + SetNativeWindowProperty(kWidgetKey, this); } void WidgetGtk::ConfigureWidgetForTransparentBackground(GtkWidget* parent) { |