| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gfx/gtk_native_view_id_manager.h" | 5 #include "ui/gfx/gtk_native_view_id_manager.h" |
| 6 | 6 |
| 7 #include <gdk/gdkx.h> |
| 7 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 8 #include <gdk/gdkx.h> | |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/singleton.h" |
| 11 #include "base/rand_util.h" | 12 #include "base/rand_util.h" |
| 13 #include "ui/base/gtk/gdk_x_compat.h" |
| 12 #include "ui/base/gtk/gtk_compat.h" | 14 #include "ui/base/gtk/gtk_compat.h" |
| 13 #include "ui/base/gtk/gdk_x_compat.h" | |
| 14 #include "ui/gfx/gtk_preserve_window.h" | 15 #include "ui/gfx/gtk_preserve_window.h" |
| 15 | 16 |
| 16 // ----------------------------------------------------------------------------- | 17 // ----------------------------------------------------------------------------- |
| 17 // Bounce functions for GTK to callback into a C++ object... | 18 // Bounce functions for GTK to callback into a C++ object... |
| 18 | 19 |
| 19 void OnRealize(gfx::NativeView widget, void* arg) { | 20 void OnRealize(gfx::NativeView widget, void* arg) { |
| 20 GtkNativeViewManager* manager = reinterpret_cast<GtkNativeViewManager*>(arg); | 21 GtkNativeViewManager* manager = reinterpret_cast<GtkNativeViewManager*>(arg); |
| 21 manager->OnRealize(widget); | 22 manager->OnRealize(widget); |
| 22 } | 23 } |
| 23 | 24 |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 | 245 |
| 245 if (k != perm_xid_to_info_.end()) | 246 if (k != perm_xid_to_info_.end()) |
| 246 k->second.widget = NULL; | 247 k->second.widget = NULL; |
| 247 } | 248 } |
| 248 | 249 |
| 249 native_view_to_id_.erase(i); | 250 native_view_to_id_.erase(i); |
| 250 id_to_info_.erase(j); | 251 id_to_info_.erase(j); |
| 251 } | 252 } |
| 252 | 253 |
| 253 // ----------------------------------------------------------------------------- | 254 // ----------------------------------------------------------------------------- |
| OLD | NEW |