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

Side by Side Diff: content/browser/renderer_host/gtk_plugin_container_manager.cc

Issue 19761007: Move NPAPI implementation out of webkit/plugins/npapi and into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "webkit/plugins/npapi/gtk_plugin_container_manager.h" 5 #include "content/browser/renderer_host/gtk_plugin_container_manager.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/browser/renderer_host/gtk_plugin_container.h"
11 #include "content/common/webplugin_geometry.h"
10 #include "ui/base/gtk/gtk_compat.h" 12 #include "ui/base/gtk/gtk_compat.h"
11 #include "ui/gfx/gtk_util.h" 13 #include "ui/gfx/gtk_util.h"
12 #include "webkit/plugins/npapi/gtk_plugin_container.h"
13 #include "webkit/plugins/npapi/webplugin.h"
14 14
15 namespace webkit { 15 namespace content {
16 namespace npapi {
17 16
18 GtkPluginContainerManager::GtkPluginContainerManager() : host_widget_(NULL) {} 17 GtkPluginContainerManager::GtkPluginContainerManager() : host_widget_(NULL) {}
19 18
20 GtkPluginContainerManager::~GtkPluginContainerManager() {} 19 GtkPluginContainerManager::~GtkPluginContainerManager() {}
21 20
22 GtkWidget* GtkPluginContainerManager::CreatePluginContainer( 21 GtkWidget* GtkPluginContainerManager::CreatePluginContainer(
23 gfx::PluginWindowHandle id) { 22 gfx::PluginWindowHandle id) {
24 DCHECK(host_widget_); 23 DCHECK(host_widget_);
25 GtkWidget *widget = gtk_plugin_container_new(); 24 GtkWidget *widget = gtk_plugin_container_new();
26 plugin_window_to_widget_map_.insert(std::make_pair(id, widget)); 25 plugin_window_to_widget_map_.insert(std::make_pair(id, widget));
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 void GtkPluginContainerManager::RealizeCallback(GtkWidget* widget, 151 void GtkPluginContainerManager::RealizeCallback(GtkWidget* widget,
153 void* user_data) { 152 void* user_data) {
154 GtkPluginContainerManager* plugin_container_manager = 153 GtkPluginContainerManager* plugin_container_manager =
155 static_cast<GtkPluginContainerManager*>(user_data); 154 static_cast<GtkPluginContainerManager*>(user_data);
156 155
157 gfx::PluginWindowHandle id = plugin_container_manager->MapWidgetToID(widget); 156 gfx::PluginWindowHandle id = plugin_container_manager->MapWidgetToID(widget);
158 if (id) 157 if (id)
159 gtk_socket_add_id(GTK_SOCKET(widget), id); 158 gtk_socket_add_id(GTK_SOCKET(widget), id);
160 } 159 }
161 160
162 } // namespace npapi 161 } // namespace content
163 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698