diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 06:27:50 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 06:27:50 +0000 |
commit | 191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c (patch) | |
tree | b982048e66a62646694c16c2cb10cb7ad30d8912 /webkit/glue/plugins/gtk_plugin_container_manager.h | |
parent | cfef856dd2ccece3cea13ccc96ac9579fd2b30b5 (diff) | |
download | chromium_src-191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c.zip chromium_src-191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c.tar.gz chromium_src-191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c.tar.bz2 |
Re-land earlier patch that moves the NPAPI implementation from webkit/glue/plugins to webkit/plugins/npapi
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/gtk_plugin_container_manager.h')
-rw-r--r-- | webkit/glue/plugins/gtk_plugin_container_manager.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/webkit/glue/plugins/gtk_plugin_container_manager.h b/webkit/glue/plugins/gtk_plugin_container_manager.h deleted file mode 100644 index 7f7db8d..0000000 --- a/webkit/glue/plugins/gtk_plugin_container_manager.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2009 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. - -#ifndef WEBKIT_GLUE_PLUGINS_GTK_PLUGIN_CONTAINER_MANAGER_H_ -#define WEBKIT_GLUE_PLUGINS_GTK_PLUGIN_CONTAINER_MANAGER_H_ - -#include <gtk/gtk.h> -#include <map> - -#include "gfx/native_widget_types.h" - -typedef struct _GtkWidget GtkWidget; - -namespace webkit_glue { -struct WebPluginGeometry; -} - -// Helper class that creates and manages plugin containers (GtkSocket). -class GtkPluginContainerManager { - public: - GtkPluginContainerManager(); - ~GtkPluginContainerManager(); - - // Sets the widget that will host the plugin containers. Must be a GtkFixed. - void set_host_widget(GtkWidget *widget) { host_widget_ = widget; } - - // Creates a new plugin container, for a given plugin XID. - GtkWidget* CreatePluginContainer(gfx::PluginWindowHandle id); - - // Destroys a plugin container, given the plugin XID. - void DestroyPluginContainer(gfx::PluginWindowHandle id); - - // Takes an update from WebKit about a plugin's position and side and moves - // the plugin accordingly. - void MovePluginContainer(const webkit_glue::WebPluginGeometry& move); - - private: - // Maps a plugin XID to the corresponding container widget. - GtkWidget* MapIDToWidget(gfx::PluginWindowHandle id); - - // Maps a container widget to the corresponding plugin XID. - gfx::PluginWindowHandle MapWidgetToID(GtkWidget* widget); - - // Callback for when the plugin container gets realized, at which point it - // plugs the plugin XID. - static void RealizeCallback(GtkWidget *widget, void *user_data); - - // Parent of the plugin containers. - GtkWidget* host_widget_; - - // A map that associates plugin containers to the plugin XID. - typedef std::map<gfx::PluginWindowHandle, GtkWidget*> PluginWindowToWidgetMap; - PluginWindowToWidgetMap plugin_window_to_widget_map_; -}; - -#endif // WEBKIT_GLUE_PLUGINS_GTK_PLUGIN_CONTAINER_MANAGER_H_ |