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

Unified Diff: ui/gfx/gtk_native_view_id_manager.cc

Issue 9167002: Revert 116956 - GTK: Seal up GSEALs, focusing on GtkSelectionData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 11 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 | « ui/base/x/x11_util.cc ('k') | ui/gfx/gtk_preserve_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gtk_native_view_id_manager.cc
===================================================================
--- ui/gfx/gtk_native_view_id_manager.cc (revision 116976)
+++ ui/gfx/gtk_native_view_id_manager.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -69,7 +69,7 @@
NativeViewInfo info;
info.widget = widget;
if (gtk_widget_get_realized(widget)) {
- GdkWindow *gdk_window = gtk_widget_get_window(widget);
+ GdkWindow *gdk_window = widget->window;
DCHECK(gdk_window);
info.x_window_id = GDK_WINDOW_XID(gdk_window);
}
@@ -128,7 +128,7 @@
reinterpret_cast<GtkPreserveWindow*>(i->second.widget);
gtk_preserve_window_set_preserve(widget, TRUE);
- *output = GDK_WINDOW_XID(gtk_widget_get_window(i->second.widget));
+ *output = GDK_WINDOW_XID(i->second.widget->window);
// Update the reference count on the permanent XID.
PermanentXIDInfo info;
@@ -207,10 +207,9 @@
id_to_info_.find(id);
CHECK(i != id_to_info_.end());
+ CHECK(widget->window);
- GdkWindow* gdk_window = gtk_widget_get_window(widget);
- CHECK(gdk_window);
- i->second.x_window_id = GDK_WINDOW_XID(gdk_window);
+ i->second.x_window_id = GDK_WINDOW_XID(widget->window);
}
void GtkNativeViewManager::OnUnrealize(gfx::NativeView widget) {
@@ -240,7 +239,7 @@
gtk_preserve_window_get_preserve(
reinterpret_cast<GtkPreserveWindow*>(widget))) {
std::map<XID, PermanentXIDInfo>::iterator k =
- perm_xid_to_info_.find(GDK_WINDOW_XID(gtk_widget_get_window(widget)));
+ perm_xid_to_info_.find(GDK_WINDOW_XID(widget->window));
if (k != perm_xid_to_info_.end())
k->second.widget = NULL;
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | ui/gfx/gtk_preserve_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698