summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 13:54:29 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 13:54:29 +0000
commite6269fd0e957510a2536a77e5a2fcabf799ccd20 (patch)
treee2185f9d89325d873fe3bd99ed27baf6224ed578 /views/widget
parent1505fa2d80afe698db06150512b26c2d08d0e088 (diff)
downloadchromium_src-e6269fd0e957510a2536a77e5a2fcabf799ccd20.zip
chromium_src-e6269fd0e957510a2536a77e5a2fcabf799ccd20.tar.gz
chromium_src-e6269fd0e957510a2536a77e5a2fcabf799ccd20.tar.bz2
views: implement a TODO to move WidgetGtk::GetWindowForNative to WindowGtk.
BUG=NONE TEST=compiles. Review URL: http://codereview.chromium.org/1640003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48717 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/widget_gtk.cc12
-rw-r--r--views/widget/widget_gtk.h9
2 files changed, 1 insertions, 20 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index b166fce..5ca89a5 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -423,12 +423,6 @@ WidgetGtk* WidgetGtk::GetViewForNative(GtkWidget* widget) {
return static_cast<WidgetGtk*>(GetWidgetFromNativeView(widget));
}
-// static
-WindowGtk* WidgetGtk::GetWindowForNative(GtkWidget* widget) {
- gpointer user_data = g_object_get_data(G_OBJECT(widget), "chrome-window");
- return static_cast<WindowGtk*>(user_data);
-}
-
void WidgetGtk::ResetDropTarget() {
ignore_drag_leave_ = false;
drop_target_.reset(NULL);
@@ -1156,11 +1150,6 @@ void WidgetGtk::ReleaseGrab() {
}
}
-// static
-void WidgetGtk::SetWindowForNative(GtkWidget* widget, WindowGtk* window) {
- g_object_set_data(G_OBJECT(widget), "chrome-window", window);
-}
-
////////////////////////////////////////////////////////////////////////////////
// WidgetGtk, private:
@@ -1330,7 +1319,6 @@ void WidgetGtk::CreateGtkWidget(GtkWidget* parent, const gfx::Rect& bounds) {
// We'll take care of positioning our window.
gtk_window_set_position(GTK_WINDOW(widget_), GTK_WIN_POS_NONE);
}
- SetWindowForNative(widget_, static_cast<WindowGtk*>(this));
window_contents_ = gtk_views_fixed_new();
gtk_widget_set_name(window_contents_, "views-gtkwidget-window-fixed");
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index ad794e1..980baaf 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -140,10 +140,6 @@ class WidgetGtk
// Gets the WidgetGtk in the userdata section of the widget.
static WidgetGtk* GetViewForNative(GtkWidget* widget);
- // Gets the WindowGtk in the userdata section of the widget.
- // TODO(beng): move to WindowGtk
- static WindowGtk* GetWindowForNative(GtkWidget* widget);
-
// Sets the drop target to NULL. This is invoked by DropTargetGTK when the
// drop is done.
void ResetDropTarget();
@@ -278,9 +274,6 @@ class WidgetGtk
// Releases a grab done by this widget.
virtual void ReleaseGrab();
- // Sets the WindowGtk in the userdata section of the widget.
- static void SetWindowForNative(GtkWidget* widget, WindowGtk* window);
-
// Are we a subclass of WindowGtk?
bool is_window_;