OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "webkit/glue/plugins/gtk_plugin_container_manager.h" | 5 #include "webkit/glue/plugins/gtk_plugin_container_manager.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/gfx/gtk_util.h" | 9 #include "app/gfx/gtk_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "webkit/glue/plugins/gtk_plugin_container.h" | 11 #include "webkit/glue/plugins/gtk_plugin_container.h" |
12 #include "webkit/glue/webplugin.h" | 12 #include "webkit/glue/webplugin.h" |
13 | 13 |
14 GtkWidget* GtkPluginContainerManager::CreatePluginContainer( | 14 GtkWidget* GtkPluginContainerManager::CreatePluginContainer( |
15 gfx::PluginWindowHandle id) { | 15 gfx::PluginWindowHandle id) { |
16 DCHECK(host_widget_); | 16 DCHECK(host_widget_); |
17 GtkWidget *widget = gtk_plugin_container_new(); | 17 GtkWidget *widget = gtk_plugin_container_new(); |
18 plugin_window_to_widget_map_.insert(std::make_pair(id, widget)); | 18 plugin_window_to_widget_map_.insert(std::make_pair(id, widget)); |
19 | 19 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // static | 135 // static |
136 void GtkPluginContainerManager::RealizeCallback(GtkWidget* widget, | 136 void GtkPluginContainerManager::RealizeCallback(GtkWidget* widget, |
137 void* user_data) { | 137 void* user_data) { |
138 GtkPluginContainerManager* plugin_container_manager = | 138 GtkPluginContainerManager* plugin_container_manager = |
139 static_cast<GtkPluginContainerManager*>(user_data); | 139 static_cast<GtkPluginContainerManager*>(user_data); |
140 | 140 |
141 gfx::PluginWindowHandle id = plugin_container_manager->MapWidgetToID(widget); | 141 gfx::PluginWindowHandle id = plugin_container_manager->MapWidgetToID(widget); |
142 if (id) | 142 if (id) |
143 gtk_socket_add_id(GTK_SOCKET(widget), id); | 143 gtk_socket_add_id(GTK_SOCKET(widget), id); |
144 } | 144 } |
OLD | NEW |