diff options
Diffstat (limited to 'content/browser')
26 files changed, 409 insertions, 87 deletions
diff --git a/content/browser/plugin_loader_posix.cc b/content/browser/plugin_loader_posix.cc index dc58114..15dd86a 100644 --- a/content/browser/plugin_loader_posix.cc +++ b/content/browser/plugin_loader_posix.cc @@ -10,9 +10,9 @@ #include "base/metrics/histogram.h" #include "content/browser/utility_process_host_impl.h" #include "content/common/child_process_host_impl.h" +#include "content/common/plugin_list.h" #include "content/common/utility_messages.h" #include "content/public/browser/browser_thread.h" -#include "webkit/plugins/npapi/plugin_list.h" namespace content { @@ -75,12 +75,10 @@ void PluginLoaderPosix::GetPluginsToLoad() { next_load_index_ = 0; canonical_list_.clear(); - webkit::npapi::PluginList::Singleton()->GetPluginPathsToLoad( - &canonical_list_); + PluginList::Singleton()->GetPluginPathsToLoad(&canonical_list_); internal_plugins_.clear(); - webkit::npapi::PluginList::Singleton()->GetInternalPlugins( - &internal_plugins_); + PluginList::Singleton()->GetInternalPlugins(&internal_plugins_); BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(&PluginLoaderPosix::LoadPluginsInternal, @@ -163,7 +161,7 @@ bool PluginLoaderPosix::MaybeRunPendingCallbacks() { if (next_load_index_ < canonical_list_.size()) return false; - webkit::npapi::PluginList::Singleton()->SetPlugins(loaded_plugins_); + PluginList::Singleton()->SetPlugins(loaded_plugins_); // Only call the first callback with loaded plugins because there may be // some extra plugin paths added since the first callback is added. diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index 8c4756a..fcde1ff 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -50,9 +50,8 @@ #if defined(OS_WIN) #include "base/win/windows_version.h" +#include "content/common/plugin_constants_win.h" #include "content/public/common/sandboxed_process_launcher_delegate.h" -#include "webkit/plugins/npapi/plugin_constants_win.h" -#include "webkit/plugins/npapi/webplugin_delegate_impl.h" #endif namespace content { diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc index 92d43c5..f1e9efa 100644 --- a/content/browser/plugin_service_impl.cc +++ b/content/browser/plugin_service_impl.cc @@ -20,6 +20,7 @@ #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/common/pepper_plugin_registry.h" +#include "content/common/plugin_list.h" #include "content/common/view_messages.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" @@ -27,13 +28,12 @@ #include "content/public/browser/resource_context.h" #include "content/public/common/content_switches.h" #include "content/public/common/process_type.h" -#include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/plugin_utils.h" #include "webkit/plugins/plugin_constants.h" #include "webkit/plugins/webplugininfo.h" #if defined(OS_WIN) -#include "webkit/plugins/npapi/plugin_constants_win.h" +#include "content/common/plugin_constants_win.h" #endif #if defined(OS_POSIX) @@ -107,7 +107,7 @@ void NotifyPluginDirChanged(const base::FilePath& path, bool error) { } VLOG(1) << "Watched path changed: " << path.value(); // Make the plugin list update itself - webkit::npapi::PluginList::Singleton()->RefreshPlugins(); + PluginList::Singleton()->RefreshPlugins(); BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, base::Bind(&PluginService::PurgePluginListCache, @@ -166,7 +166,7 @@ PluginServiceImpl::~PluginServiceImpl() { void PluginServiceImpl::Init() { plugin_list_token_ = BrowserThread::GetBlockingPool()->GetSequenceToken(); - webkit::npapi::PluginList::Singleton()->set_will_load_plugins_callback( + PluginList::Singleton()->set_will_load_plugins_callback( base::Bind(&WillLoadPluginsCallback, plugin_list_token_)); RegisterPepperPlugins(); @@ -196,10 +196,10 @@ void PluginServiceImpl::Init() { AddExtraPluginPath(path); path = command_line->GetSwitchValuePath(switches::kExtraPluginDir); if (!path.empty()) - webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(path); + PluginList::Singleton()->AddExtraPluginDir(path); if (command_line->HasSwitch(switches::kDisablePluginsDiscovery)) - webkit::npapi::PluginList::Singleton()->DisablePluginsDiscovery(); + PluginList::Singleton()->DisablePluginsDiscovery(); } void PluginServiceImpl::StartWatchingPlugins() { @@ -208,7 +208,7 @@ void PluginServiceImpl::StartWatchingPlugins() { // watch for changes in the paths that are expected to contain plugins. #if defined(OS_WIN) if (hkcu_key_.Create(HKEY_CURRENT_USER, - webkit::npapi::kRegistryMozillaPlugins, + kRegistryMozillaPlugins, KEY_NOTIFY) == ERROR_SUCCESS) { if (hkcu_key_.StartWatching() == ERROR_SUCCESS) { hkcu_event_.reset(new base::WaitableEvent(hkcu_key_.watch_event())); @@ -219,7 +219,7 @@ void PluginServiceImpl::StartWatchingPlugins() { } } if (hklm_key_.Create(HKEY_LOCAL_MACHINE, - webkit::npapi::kRegistryMozillaPlugins, + kRegistryMozillaPlugins, KEY_NOTIFY) == ERROR_SUCCESS) { if (hklm_key_.StartWatching() == ERROR_SUCCESS) { hklm_event_.reset(new base::WaitableEvent(hklm_key_.watch_event())); @@ -237,7 +237,7 @@ void PluginServiceImpl::StartWatchingPlugins() { // Get the list of all paths for registering the FilePathWatchers // that will track and if needed reload the list of plugins on runtime. std::vector<base::FilePath> plugin_dirs; - webkit::npapi::PluginList::Singleton()->GetPluginDirectories(&plugin_dirs); + PluginList::Singleton()->GetPluginDirectories(&plugin_dirs); for (size_t i = 0; i < plugin_dirs.size(); ++i) { // FilePathWatcher can not handle non-absolute paths under windows. @@ -510,7 +510,7 @@ bool PluginServiceImpl::GetPluginInfoArray( std::vector<webkit::WebPluginInfo>* plugins, std::vector<std::string>* actual_mime_types) { bool use_stale = false; - webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( + PluginList::Singleton()->GetPluginInfoArray( url, mime_type, allow_wildcard, &use_stale, plugins, actual_mime_types); return use_stale; } @@ -551,7 +551,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, bool PluginServiceImpl::GetPluginInfoByPath(const base::FilePath& plugin_path, webkit::WebPluginInfo* info) { std::vector<webkit::WebPluginInfo> plugins; - webkit::npapi::PluginList::Singleton()->GetPluginsNoRefresh(&plugins); + PluginList::Singleton()->GetPluginsNoRefresh(&plugins); for (std::vector<webkit::WebPluginInfo>::iterator it = plugins.begin(); it != plugins.end(); @@ -600,8 +600,7 @@ void PluginServiceImpl::GetPlugins(const GetPluginsCallback& callback) { } #if defined(OS_POSIX) std::vector<webkit::WebPluginInfo> cached_plugins; - if (webkit::npapi::PluginList::Singleton()->GetPluginsNoRefresh( - &cached_plugins)) { + if (PluginList::Singleton()->GetPluginsNoRefresh(&cached_plugins)) { // Can't assume the caller is reentrant. target_loop->PostTask(FROM_HERE, base::Bind(callback, cached_plugins)); @@ -626,7 +625,7 @@ void PluginServiceImpl::GetPluginsInternal( plugin_list_token_)); std::vector<webkit::WebPluginInfo> plugins; - webkit::npapi::PluginList::Singleton()->GetPlugins(&plugins); + PluginList::Singleton()->GetPlugins(&plugins); target_loop->PostTask(FROM_HERE, base::Bind(callback, plugins)); @@ -641,7 +640,7 @@ void PluginServiceImpl::OnWaitableEventSignaled( hklm_key_.StartWatching(); } - webkit::npapi::PluginList::Singleton()->RefreshPlugins(); + PluginList::Singleton()->RefreshPlugins(); PurgePluginListCache(NULL, false); #else // This event should only get signaled on a Windows machine. @@ -749,39 +748,38 @@ bool PluginServiceImpl::IsPluginUnstable(const base::FilePath& path) { } void PluginServiceImpl::RefreshPlugins() { - webkit::npapi::PluginList::Singleton()->RefreshPlugins(); + PluginList::Singleton()->RefreshPlugins(); } void PluginServiceImpl::AddExtraPluginPath(const base::FilePath& path) { - webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); + PluginList::Singleton()->AddExtraPluginPath(path); } void PluginServiceImpl::RemoveExtraPluginPath(const base::FilePath& path) { - webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath(path); + PluginList::Singleton()->RemoveExtraPluginPath(path); } void PluginServiceImpl::AddExtraPluginDir(const base::FilePath& path) { - webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(path); + PluginList::Singleton()->AddExtraPluginDir(path); } void PluginServiceImpl::RegisterInternalPlugin( const webkit::WebPluginInfo& info, bool add_at_beginning) { - webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( - info, add_at_beginning); + PluginList::Singleton()->RegisterInternalPlugin(info, add_at_beginning); } void PluginServiceImpl::UnregisterInternalPlugin(const base::FilePath& path) { - webkit::npapi::PluginList::Singleton()->UnregisterInternalPlugin(path); + PluginList::Singleton()->UnregisterInternalPlugin(path); } void PluginServiceImpl::GetInternalPlugins( std::vector<webkit::WebPluginInfo>* plugins) { - webkit::npapi::PluginList::Singleton()->GetInternalPlugins(plugins); + PluginList::Singleton()->GetInternalPlugins(plugins); } void PluginServiceImpl::DisablePluginsDiscoveryForTesting() { - webkit::npapi::PluginList::Singleton()->DisablePluginsDiscovery(); + PluginList::Singleton()->DisablePluginsDiscovery(); } #if defined(OS_MACOSX) diff --git a/content/browser/plugin_service_impl_browsertest.cc b/content/browser/plugin_service_impl_browsertest.cc index 102c492..26e4c43 100644 --- a/content/browser/plugin_service_impl_browsertest.cc +++ b/content/browser/plugin_service_impl_browsertest.cc @@ -18,7 +18,6 @@ #include "content/shell/shell.h" #include "content/test/content_browser_test.h" #include "testing/gmock/include/gmock/gmock.h" -#include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/plugin_utils.h" namespace content { diff --git a/content/browser/renderer_host/gtk_plugin_container.cc b/content/browser/renderer_host/gtk_plugin_container.cc new file mode 100644 index 0000000..0b83f2e --- /dev/null +++ b/content/browser/renderer_host/gtk_plugin_container.cc @@ -0,0 +1,89 @@ +// 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. + +#include "content/browser/renderer_host/gtk_plugin_container.h" + +#include <gtk/gtk.h> + +#include "base/basictypes.h" + +namespace content { + +namespace { + +// NOTE: This class doesn't have constructors/destructors, it is created +// through GLib's object management. +class GtkPluginContainer : public GtkSocket { + public: + // Sets the requested size of the widget. + void set_size(int width, int height) { + width_ = width; + height_ = height; + } + + // Casts a widget into a GtkPluginContainer, after checking the type. + template <class T> + static GtkPluginContainer *CastChecked(T *instance) { + return G_TYPE_CHECK_INSTANCE_CAST(instance, GetType(), GtkPluginContainer); + } + + // Create and register our custom container type with GTK. + static GType GetType() { + static GType type = 0; // We only want to register our type once. + if (!type) { + static const GTypeInfo info = { + sizeof(GtkSocketClass), + NULL, NULL, + static_cast<GClassInitFunc>(&ClassInit), + NULL, NULL, + sizeof(GtkPluginContainer), + 0, &InstanceInit, + }; + type = g_type_register_static(GTK_TYPE_SOCKET, + "GtkPluginContainer", + &info, + static_cast<GTypeFlags>(0)); + } + return type; + } + + // Implementation of the class initializer. + static void ClassInit(gpointer klass, gpointer class_data_unusued) { + GtkWidgetClass* widget_class = reinterpret_cast<GtkWidgetClass*>(klass); + widget_class->size_request = &HandleSizeRequest; + } + + // Implementation of the instance initializer (constructor). + static void InstanceInit(GTypeInstance *instance, gpointer klass) { + GtkPluginContainer *container = CastChecked(instance); + container->set_size(0, 0); + } + + // Report our allocation size during size requisition. + static void HandleSizeRequest(GtkWidget* widget, + GtkRequisition* requisition) { + GtkPluginContainer *container = CastChecked(widget); + requisition->width = container->width_; + requisition->height = container->height_; + } + + int width_; + int height_; + DISALLOW_IMPLICIT_CONSTRUCTORS(GtkPluginContainer); +}; + +} // namespace + +// Create a new instance of our GTK widget object. +GtkWidget* gtk_plugin_container_new() { + return GTK_WIDGET(g_object_new(GtkPluginContainer::GetType(), NULL)); +} + +void gtk_plugin_container_set_size(GtkWidget *widget, int width, int height) { + GtkPluginContainer::CastChecked(widget)->set_size(width, height); + // Signal the parent that the size request has changed. + gtk_widget_queue_resize_no_redraw(widget); +} + +} // namespace content diff --git a/content/browser/renderer_host/gtk_plugin_container.h b/content/browser/renderer_host/gtk_plugin_container.h new file mode 100644 index 0000000..1713cd4 --- /dev/null +++ b/content/browser/renderer_host/gtk_plugin_container.h @@ -0,0 +1,30 @@ +// 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 CONTENT_BROWSER_RENDERER_HOST_GTK_PLUGIN_CONTAINER_H_ +#define CONTENT_BROWSER_RENDERER_HOST_GTK_PLUGIN_CONTAINER_H_ + +// Windowed plugins are embedded via XEmbed, which is implemented by +// GtkPlug/GtkSocket. But we want to control sizing and positioning +// directly, so we need a subclass of GtkSocket that sidesteps the +// size_request handler. +// +// The custom size_request handler just reports the size set by +// gtk_plugin_container_set_size. + +typedef struct _GtkWidget GtkWidget; + +namespace content { + +// Return a new GtkPluginContainer. +// Intentionally GTK-style here since we're creating a custom GTK widget. +// This is a GtkSocket subclass; see its documentation for available methods. +GtkWidget* gtk_plugin_container_new(); + +// Sets the size of the GtkPluginContainer. +void gtk_plugin_container_set_size(GtkWidget *widget, int width, int height); + +} // namespace content + +#endif // CONTENT_BROWSER_RENDERER_HOST_GTK_PLUGIN_CONTAINER_H_ diff --git a/content/browser/renderer_host/gtk_plugin_container_manager.cc b/content/browser/renderer_host/gtk_plugin_container_manager.cc new file mode 100644 index 0000000..93e2077 --- /dev/null +++ b/content/browser/renderer_host/gtk_plugin_container_manager.cc @@ -0,0 +1,161 @@ +// Copyright (c) 2012 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. + +#include "content/browser/renderer_host/gtk_plugin_container_manager.h" + +#include <gtk/gtk.h> + +#include "base/logging.h" +#include "content/browser/renderer_host/gtk_plugin_container.h" +#include "content/common/webplugin_geometry.h" +#include "ui/base/gtk/gtk_compat.h" +#include "ui/gfx/gtk_util.h" + +namespace content { + +GtkPluginContainerManager::GtkPluginContainerManager() : host_widget_(NULL) {} + +GtkPluginContainerManager::~GtkPluginContainerManager() {} + +GtkWidget* GtkPluginContainerManager::CreatePluginContainer( + gfx::PluginWindowHandle id) { + DCHECK(host_widget_); + GtkWidget *widget = gtk_plugin_container_new(); + plugin_window_to_widget_map_.insert(std::make_pair(id, widget)); + + // The Realize callback is responsible for adding the plug into the socket. + // The reason is 2-fold: + // - the plug can't be added until the socket is realized, but this may not + // happen until the socket is attached to a top-level window, which isn't the + // case for background tabs. + // - when dragging tabs, the socket gets unrealized, which breaks the XEMBED + // connection. We need to make it again when the tab is reattached, and the + // socket gets realized again. + // + // Note, the RealizeCallback relies on the plugin_window_to_widget_map_ to + // have the mapping. + g_signal_connect(widget, "realize", + G_CALLBACK(RealizeCallback), this); + + // Don't destroy the widget when the plug is removed. + g_signal_connect(widget, "plug-removed", + G_CALLBACK(gtk_true), NULL); + + gtk_container_add(GTK_CONTAINER(host_widget_), widget); + gtk_widget_show(widget); + + return widget; +} + +void GtkPluginContainerManager::DestroyPluginContainer( + gfx::PluginWindowHandle id) { + DCHECK(host_widget_); + GtkWidget* widget = MapIDToWidget(id); + if (widget) + gtk_widget_destroy(widget); + + plugin_window_to_widget_map_.erase(id); +} + +void GtkPluginContainerManager::MovePluginContainer( + const WebPluginGeometry& move) { + DCHECK(host_widget_); + GtkWidget *widget = MapIDToWidget(move.window); + if (!widget) + return; + + DCHECK(gtk_widget_get_has_window(widget)); + + if (!move.visible) { + gtk_widget_hide(widget); + return; + } + + gtk_widget_show(widget); + + if (!move.rects_valid) + return; + + // TODO(piman): if the widget hasn't been realized (e.g. the tab has been + // torn off and the parent gtk widget has been detached from the hierarchy), + // we lose the cutout information. + if (gtk_widget_get_realized(widget)) { + GdkRectangle clip_rect = move.clip_rect.ToGdkRectangle(); + GdkRegion* clip_region = gdk_region_rectangle(&clip_rect); + gfx::SubtractRectanglesFromRegion(clip_region, move.cutout_rects); + gdk_window_shape_combine_region(gtk_widget_get_window(widget), + clip_region, 0, 0); + gdk_region_destroy(clip_region); + } + + // Update the window position. Resizing is handled by WebPluginDelegate. + // TODO(deanm): Verify that we only need to move and not resize. + // TODO(evanm): we should cache the last shape and position and skip all + // of this business in the common case where nothing has changed. + int current_x, current_y; + + // Until the above TODO is resolved, we can grab the last position + // off of the GtkFixed with a bit of hackery. + GValue value = {0}; + g_value_init(&value, G_TYPE_INT); + gtk_container_child_get_property(GTK_CONTAINER(host_widget_), widget, + "x", &value); + current_x = g_value_get_int(&value); + gtk_container_child_get_property(GTK_CONTAINER(host_widget_), widget, + "y", &value); + current_y = g_value_get_int(&value); + g_value_unset(&value); + + if (move.window_rect.x() != current_x || + move.window_rect.y() != current_y) { + // Calling gtk_fixed_move unnecessarily is a no-no, as it causes the + // parent window to repaint! + gtk_fixed_move(GTK_FIXED(host_widget_), + widget, + move.window_rect.x(), + move.window_rect.y()); + } + + gtk_plugin_container_set_size(widget, + move.window_rect.width(), + move.window_rect.height()); +} + +GtkWidget* GtkPluginContainerManager::MapIDToWidget( + gfx::PluginWindowHandle id) { + PluginWindowToWidgetMap::const_iterator i = + plugin_window_to_widget_map_.find(id); + if (i != plugin_window_to_widget_map_.end()) + return i->second; + + LOG(ERROR) << "Request for widget host for unknown window id " << id; + + return NULL; +} + +gfx::PluginWindowHandle GtkPluginContainerManager::MapWidgetToID( + GtkWidget* widget) { + for (PluginWindowToWidgetMap::const_iterator i = + plugin_window_to_widget_map_.begin(); + i != plugin_window_to_widget_map_.end(); ++i) { + if (i->second == widget) + return i->first; + } + + LOG(ERROR) << "Request for id for unknown widget"; + return 0; +} + +// static +void GtkPluginContainerManager::RealizeCallback(GtkWidget* widget, + void* user_data) { + GtkPluginContainerManager* plugin_container_manager = + static_cast<GtkPluginContainerManager*>(user_data); + + gfx::PluginWindowHandle id = plugin_container_manager->MapWidgetToID(widget); + if (id) + gtk_socket_add_id(GTK_SOCKET(widget), id); +} + +} // namespace content diff --git a/content/browser/renderer_host/gtk_plugin_container_manager.h b/content/browser/renderer_host/gtk_plugin_container_manager.h new file mode 100644 index 0000000..bd0e7c1 --- /dev/null +++ b/content/browser/renderer_host/gtk_plugin_container_manager.h @@ -0,0 +1,58 @@ +// 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. + +#ifndef CONTENT_BROWSER_RENDERER_HOST_GTK_PLUGIN_CONTAINER_MANAGER_H_ +#define CONTENT_BROWSER_RENDERER_HOST_GTK_PLUGIN_CONTAINER_MANAGER_H_ + +#include <gtk/gtk.h> +#include <map> + +#include "ui/gfx/native_widget_types.h" + +typedef struct _GtkWidget GtkWidget; + +namespace content { +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 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_; +}; + +} // namespace content + +#endif // CONTENT_BROWSER_RENDERER_HOST_GTK_PLUGIN_CONTAINER_MANAGER_H_ diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index d25fb86..c8882c9 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -63,7 +63,6 @@ #include "net/url_request/url_request_context_getter.h" #include "third_party/WebKit/public/web/WebNotificationPresenter.h" #include "ui/gfx/color_profile.h" -#include "webkit/plugins/npapi/webplugin.h" #include "webkit/plugins/plugin_constants.h" #include "webkit/plugins/webplugininfo.h" diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 84a82ae..8b3fa65 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -60,8 +60,7 @@ #include "ui/gfx/vector2d_conversions.h" #include "webkit/common/cursors/webcursor.h" #include "webkit/common/webpreferences.h" -#include "webkit/plugins/npapi/webplugin.h" -#include "webkit/plugins/npapi/webplugin_delegate_impl.h" +#include "webkit/plugins/npapi/plugin_utils.h" #if defined(TOOLKIT_GTK) #include "content/browser/renderer_host/backing_store_gtk.h" @@ -72,7 +71,6 @@ using base::Time; using base::TimeDelta; using base::TimeTicks; -using webkit::npapi::WebPluginDelegateImpl; using WebKit::WebGestureEvent; using WebKit::WebInputEvent; using WebKit::WebKeyboardEvent; @@ -2233,8 +2231,7 @@ void RenderWidgetHostImpl::OnShowDisambiguationPopup( void RenderWidgetHostImpl::OnWindowlessPluginDummyWindowCreated( gfx::NativeViewId dummy_activation_window) { HWND hwnd = reinterpret_cast<HWND>(dummy_activation_window); - if (!IsWindow(hwnd) || - !WebPluginDelegateImpl::IsDummyActivationWindow(hwnd)) { + if (!IsWindow(hwnd) || !webkit::npapi::IsDummyActivationWindow(hwnd)) { // This may happen as a result of a race condition when the plugin is going // away. return; @@ -2600,7 +2597,7 @@ void RenderWidgetHostImpl::ParentChanged(gfx::NativeViewId new_parent) { #if defined(OS_WIN) HWND hwnd = reinterpret_cast<HWND>(new_parent); if (!hwnd) - hwnd = WebPluginDelegateImpl::GetDefaultWindowParent(); + hwnd = webkit::npapi::GetDefaultWindowParent(); for (std::list<HWND>::iterator i = dummy_windows_for_activation_.begin(); i != dummy_windows_for_activation_.end(); ++i) { SetParent(*i, hwnd); diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index 8e6eea2..fb94c2c 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc @@ -291,7 +291,7 @@ RenderWidgetHostViewAndroid::GetNativeViewAccessible() { void RenderWidgetHostViewAndroid::MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) { + const std::vector<WebPluginGeometry>& moves) { // We don't have plugin windows on Android. Do nothing. Note: this is called // from RenderWidgetHost::OnUpdateRect which is itself invoked while // processing the corresponding message from Renderer. diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h index 5a530dd..6783e7c 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.h +++ b/content/browser/renderer_host/render_widget_host_view_android.h @@ -83,7 +83,7 @@ class RenderWidgetHostViewAndroid virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; virtual void MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; + const std::vector<WebPluginGeometry>& moves) OVERRIDE; virtual void Focus() OVERRIDE; virtual void Blur() OVERRIDE; virtual bool HasFocus() const OVERRIDE; diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 924ea56..8fbaad8 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -142,7 +142,7 @@ BOOL CALLBACK ShowWindowsCallback(HWND window, LPARAM param) { struct CutoutRectsParams { RenderWidgetHostViewAura* widget; std::vector<gfx::Rect> cutout_rects; - std::map<HWND, webkit::npapi::WebPluginGeometry>* geometry; + std::map<HWND, WebPluginGeometry>* geometry; }; // Used to update the region for the windowed plugin to draw in. We start with @@ -163,8 +163,7 @@ BOOL CALLBACK SetCutoutRectsCallback(HWND window, LPARAM param) { // Now get the cached clip rect and cutouts for this plugin window that came // from the renderer. - std::map<HWND, webkit::npapi::WebPluginGeometry>::iterator i = - params->geometry->begin(); + std::map<HWND, WebPluginGeometry>::iterator i = params->geometry->begin(); while (i != params->geometry->end() && i->second.window != window && GetParent(i->second.window) != window) { @@ -878,7 +877,7 @@ RenderWidgetHostViewAura::GetOrCreateBrowserAccessibilityManager() { void RenderWidgetHostViewAura::MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) { + const std::vector<WebPluginGeometry>& plugin_window_moves) { #if defined(OS_WIN) // We need to clip the rectangle to the tab's viewport, otherwise we will draw // over the browser UI. @@ -888,7 +887,7 @@ void RenderWidgetHostViewAura::MovePluginWindows( } HWND parent = window_->GetRootWindow()->GetAcceleratedWidget(); gfx::Rect view_bounds = window_->GetBoundsInRootWindow(); - std::vector<webkit::npapi::WebPluginGeometry> moves = plugin_window_moves; + std::vector<WebPluginGeometry> moves = plugin_window_moves; gfx::Rect view_port(scroll_offset.x(), scroll_offset.y(), view_bounds.width(), view_bounds.height()); diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index 9c4528d..c3cffdf 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h @@ -168,7 +168,7 @@ class RenderWidgetHostViewAura virtual void WasHidden() OVERRIDE; virtual void MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; + const std::vector<WebPluginGeometry>& moves) OVERRIDE; virtual void Focus() OVERRIDE; virtual void Blur() OVERRIDE; virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; @@ -672,7 +672,7 @@ class RenderWidgetHostViewAura std::vector<gfx::Rect> transient_rects_; std::vector<gfx::Rect> constrained_rects_; - typedef std::map<HWND, webkit::npapi::WebPluginGeometry> PluginWindowMoves; + typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; // Contains information about each windowed plugin's clip and cutout rects ( // from the renderer). This is needed because when the transient windoiws // over this view changes, we need this information in order to create a new diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc index 87c3cc0..3a1121b 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc @@ -22,17 +22,15 @@ #include "base/message_loop/message_loop.h" #include "base/win/wrapped_window_proc.h" #include "content/browser/plugin_process_host.h" +#include "content/common/plugin_constants_win.h" +#include "content/common/webplugin_geometry.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/child_process_data.h" #include "content/public/common/content_switches.h" #include "ui/base/win/dpi.h" #include "ui/base/win/hwnd_util.h" #include "ui/gfx/gdi_util.h" -#include "webkit/plugins/npapi/plugin_constants_win.h" -#include "webkit/plugins/npapi/webplugin.h" -#include "webkit/plugins/npapi/webplugin_delegate_impl.h" - -using webkit::npapi::WebPluginDelegateImpl; +#include "webkit/plugins/npapi/plugin_utils.h" #endif #if defined(TOOLKIT_GTK) @@ -120,7 +118,7 @@ LRESULT CALLBACK PluginWrapperWindowProc(HWND window, unsigned int message, bool IsPluginWrapperWindow(HWND window) { return ui::GetClassNameW(window) == - string16(webkit::npapi::kWrapperNativeWindowClassName); + string16(kWrapperNativeWindowClassName); } // Create an intermediate window between the given HWND and its parent. @@ -130,7 +128,7 @@ HWND ReparentWindow(HWND window, HWND parent) { if (!atom) { WNDCLASSEX window_class; base::win::InitializeWindowClass( - webkit::npapi::kWrapperNativeWindowClassName, + kWrapperNativeWindowClassName, &base::win::WrappedWindowProc<PluginWrapperWindowProc>, CS_DBLCLKS, 0, @@ -166,12 +164,12 @@ HWND ReparentWindow(HWND window, HWND parent) { } BOOL CALLBACK PaintEnumChildProc(HWND hwnd, LPARAM lparam) { - if (!WebPluginDelegateImpl::IsPluginDelegateWindow(hwnd)) + if (!webkit::npapi::IsPluginDelegateWindow(hwnd)) return TRUE; gfx::Rect* rect = reinterpret_cast<gfx::Rect*>(lparam); gfx::Rect rect_in_pixels = ui::win::DIPToScreenRect(*rect); - static UINT msg = RegisterWindowMessage(webkit::npapi::kPaintMessageName); + static UINT msg = RegisterWindowMessage(kPaintMessageName); WPARAM wparam = rect_in_pixels.x() << 16 | rect_in_pixels.y(); lparam = rect_in_pixels.width() << 16 | rect_in_pixels.height(); @@ -193,7 +191,7 @@ BOOL CALLBACK DetachPluginWindowsCallbackInternal(HWND window, LPARAM param) { // static void RenderWidgetHostViewBase::DetachPluginWindowsCallback(HWND window) { - if (WebPluginDelegateImpl::IsPluginDelegateWindow(window) && + if (webkit::npapi::IsPluginDelegateWindow(window) && !IsHungAppWindow(window)) { ::ShowWindow(window, SW_HIDE); SetParent(window, NULL); @@ -203,7 +201,7 @@ void RenderWidgetHostViewBase::DetachPluginWindowsCallback(HWND window) { // static void RenderWidgetHostViewBase::MovePluginWindowsHelper( HWND parent, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) { + const std::vector<WebPluginGeometry>& moves) { if (moves.empty()) return; @@ -221,7 +219,7 @@ void RenderWidgetHostViewBase::MovePluginWindowsHelper( for (size_t i = 0; i < moves.size(); ++i) { unsigned long flags = 0; - const webkit::npapi::WebPluginGeometry& move = moves[i]; + const WebPluginGeometry& move = moves[i]; HWND window = move.window; // As the plugin parent window which lives on the browser UI thread is @@ -234,7 +232,7 @@ void RenderWidgetHostViewBase::MovePluginWindowsHelper( if (!::IsWindow(window)) continue; - if (!WebPluginDelegateImpl::IsPluginDelegateWindow(window)) { + if (!webkit::npapi::IsPluginDelegateWindow(window)) { // The renderer should only be trying to move plugin windows. However, // this may happen as a result of a race condition (i.e. even after the // check right above), so we ignore it. @@ -242,7 +240,7 @@ void RenderWidgetHostViewBase::MovePluginWindowsHelper( } if (oop_plugins) { - if (cur_parent == WebPluginDelegateImpl::GetDefaultWindowParent()) { + if (cur_parent == webkit::npapi::GetDefaultWindowParent()) { // The plugin window hasn't been parented yet, add an intermediate // window that lives on this thread to speed up scrolling. Note this // only works with out of process plugins since we depend on @@ -257,7 +255,7 @@ void RenderWidgetHostViewBase::MovePluginWindowsHelper( // process synchronous Windows messages. window = cur_parent; } else { - if (cur_parent == WebPluginDelegateImpl::GetDefaultWindowParent()) + if (cur_parent == webkit::npapi::GetDefaultWindowParent()) SetParent(window, parent); } @@ -314,7 +312,7 @@ void RenderWidgetHostViewBase::MovePluginWindowsHelper( #if defined(USE_AURA) for (size_t i = 0; i < moves.size(); ++i) { - const webkit::npapi::WebPluginGeometry& move = moves[i]; + const WebPluginGeometry& move = moves[i]; RECT r; GetWindowRect(move.window, &r); gfx::Rect gr(r); diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h index 9ec7df9..895bf41 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -102,7 +102,7 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // Shared implementation of MovePluginWindows for use by win and aura/wina. static void MovePluginWindowsHelper( HWND parent, - const std::vector<webkit::npapi::WebPluginGeometry>& moves); + const std::vector<WebPluginGeometry>& moves); static void PaintPluginWindowsHelper( HWND parent, diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.cc b/content/browser/renderer_host/render_widget_host_view_gtk.cc index f882e33..4fad173 100644 --- a/content/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/content/browser/renderer_host/render_widget_host_view_gtk.cc @@ -34,6 +34,7 @@ #include "content/common/gpu/gpu_messages.h" #include "content/common/input_messages.h" #include "content/common/view_messages.h" +#include "content/common/webplugin_geometry.h" #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/common/content_switches.h" #include "skia/ext/platform_canvas.h" @@ -48,7 +49,6 @@ #include "ui/gfx/gtk_native_view_id_manager.h" #include "ui/gfx/gtk_preserve_window.h" #include "webkit/common/cursors/webcursor_gtk_data.h" -#include "webkit/plugins/npapi/webplugin.h" using WebKit::WebInputEventFactory; using WebKit::WebMouseWheelEvent; @@ -753,7 +753,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewGtk::GetNativeViewAccessible() { void RenderWidgetHostViewGtk::MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) { + const std::vector<WebPluginGeometry>& moves) { for (size_t i = 0; i < moves.size(); ++i) { plugin_container_manager_.MovePluginContainer(moves[i]); } diff --git a/content/browser/renderer_host/render_widget_host_view_gtk.h b/content/browser/renderer_host/render_widget_host_view_gtk.h index 8d17318..9ff410a 100644 --- a/content/browser/renderer_host/render_widget_host_view_gtk.h +++ b/content/browser/renderer_host/render_widget_host_view_gtk.h @@ -13,6 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "base/time/time.h" #include "content/browser/accessibility/browser_accessibility_manager.h" +#include "content/browser/renderer_host/gtk_plugin_container_manager.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/common/content_export.h" #include "ipc/ipc_sender.h" @@ -26,7 +27,6 @@ #include "ui/gfx/point.h" #include "ui/gfx/rect.h" #include "webkit/common/cursors/webcursor.h" -#include "webkit/plugins/npapi/gtk_plugin_container_manager.h" typedef struct _GtkClipboard GtkClipboard; typedef struct _GtkSelectionData GtkSelectionData; @@ -77,7 +77,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk virtual void WasHidden() OVERRIDE; virtual void MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; + const std::vector<WebPluginGeometry>& moves) OVERRIDE; virtual void Focus() OVERRIDE; virtual void Blur() OVERRIDE; virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; @@ -301,7 +301,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGtk scoped_ptr<GtkKeyBindingsHandler> key_bindings_handler_; // Helper class that lets us allocate plugin containers and move them. - webkit::npapi::GtkPluginContainerManager plugin_container_manager_; + GtkPluginContainerManager plugin_container_manager_; // The size that we want the renderer to be. We keep this in a separate // variable because resizing in GTK+ is async. diff --git a/content/browser/renderer_host/render_widget_host_view_guest.cc b/content/browser/renderer_host/render_widget_host_view_guest.cc index 37e56f1..4709a03 100644 --- a/content/browser/renderer_host/render_widget_host_view_guest.cc +++ b/content/browser/renderer_host/render_widget_host_view_guest.cc @@ -12,10 +12,10 @@ #include "content/common/browser_plugin/browser_plugin_messages.h" #include "content/common/gpu/gpu_messages.h" #include "content/common/view_messages.h" +#include "content/common/webplugin_geometry.h" #include "content/public/common/content_switches.h" #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/public/web/WebScreenInfo.h" -#include "webkit/plugins/npapi/webplugin.h" #if defined(OS_MACOSX) #import "content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.h" @@ -251,7 +251,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewGuest::GetNativeViewAccessible() { void RenderWidgetHostViewGuest::MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) { + const std::vector<WebPluginGeometry>& moves) { platform_view_->MovePluginWindows(scroll_offset, moves); } diff --git a/content/browser/renderer_host/render_widget_host_view_guest.h b/content/browser/renderer_host/render_widget_host_view_guest.h index 84b721a..15b0acc 100644 --- a/content/browser/renderer_host/render_widget_host_view_guest.h +++ b/content/browser/renderer_host/render_widget_host_view_guest.h @@ -19,7 +19,7 @@ #include "webkit/common/cursors/webcursor.h" #if defined(TOOLKIT_GTK) -#include "webkit/plugins/npapi/gtk_plugin_container_manager.h" +#include "content/browser/renderer_host/gtk_plugin_container_manager.h" #endif // defined(TOOLKIT_GTK) namespace content { @@ -79,7 +79,7 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest virtual void WasHidden() OVERRIDE; virtual void MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; + const std::vector<WebPluginGeometry>& moves) OVERRIDE; virtual void Focus() OVERRIDE; virtual void Blur() OVERRIDE; virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h index 6aa1b75..9dd7539 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -242,7 +242,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostViewBase, virtual void WasHidden() OVERRIDE; virtual void MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; + const std::vector<WebPluginGeometry>& moves) OVERRIDE; virtual void Focus() OVERRIDE; virtual void Blur() OVERRIDE; virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm index 461e595..238ffe9 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -39,6 +39,7 @@ #include "content/common/gpu/gpu_messages.h" #include "content/common/input_messages.h" #include "content/common/view_messages.h" +#include "content/common/webplugin_geometry.h" #include "content/port/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/native_web_keyboard_event.h" @@ -61,7 +62,6 @@ #include "ui/gfx/screen.h" #include "ui/gfx/size_conversions.h" #include "ui/gl/io_surface_support_mac.h" -#include "webkit/plugins/npapi/webplugin.h" using content::BackingStoreMac; using content::BrowserAccessibility; @@ -797,7 +797,7 @@ gfx::NativeViewAccessible RenderWidgetHostViewMac::GetNativeViewAccessible() { void RenderWidgetHostViewMac::MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) { + const std::vector<WebPluginGeometry>& moves) { // Must be overridden, but unused on this platform. Core Animation // plugins are drawn by the GPU process (through the compositor), // and Core Graphics plugins are drawn by the renderer process. diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm index 72cf00f..64fbd43 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm @@ -22,7 +22,6 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/test/cocoa_test_event_utils.h" #import "ui/base/test/ui_cocoa_test_helper.h" -#include "webkit/plugins/npapi/webplugin.h" // Declare things that are part of the 10.7 SDK. #if !defined(MAC_OS_X_VERSION_10_7) || \ diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc index 757d399..8916d05 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.cc +++ b/content/browser/renderer_host/render_widget_host_view_win.cc @@ -39,7 +39,9 @@ #include "content/browser/renderer_host/ui_events_helper.h" #include "content/common/accessibility_messages.h" #include "content/common/gpu/gpu_messages.h" +#include "content/common/plugin_constants_win.h" #include "content/common/view_messages.h" +#include "content/common/webplugin_geometry.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/child_process_data.h" #include "content/public/browser/content_browser_client.h" @@ -72,9 +74,6 @@ #include "ui/gfx/rect_conversions.h" #include "ui/gfx/screen.h" #include "webkit/common/cursors/webcursor.h" -#include "webkit/plugins/npapi/plugin_constants_win.h" -#include "webkit/plugins/npapi/webplugin.h" -#include "webkit/plugins/npapi/webplugin_delegate_impl.h" #include "win8/util/win8_util.h" using base::TimeDelta; @@ -558,7 +557,7 @@ void RenderWidgetHostViewWin::CreateBrowserAccessibilityManagerIfNeeded() { void RenderWidgetHostViewWin::MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) { + const std::vector<WebPluginGeometry>& plugin_window_moves) { MovePluginWindowsHelper(m_hWnd, plugin_window_moves); } @@ -2320,8 +2319,7 @@ LRESULT RenderWidgetHostViewWin::OnMouseActivate(UINT message, ::ScreenToClient(m_hWnd, &cursor_pos); HWND child_window = ::RealChildWindowFromPoint(m_hWnd, cursor_pos); if (::IsWindow(child_window) && child_window != m_hWnd) { - if (ui::GetClassName(child_window) == - webkit::npapi::kWrapperNativeWindowClassName) + if (ui::GetClassName(child_window) == kWrapperNativeWindowClassName) child_window = ::GetWindow(child_window, GW_CHILD); ::SetFocus(child_window); diff --git a/content/browser/renderer_host/render_widget_host_view_win.h b/content/browser/renderer_host/render_widget_host_view_win.h index 325a4f4..5c13a0a 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.h +++ b/content/browser/renderer_host/render_widget_host_view_win.h @@ -175,7 +175,7 @@ class RenderWidgetHostViewWin virtual void WasHidden() OVERRIDE; virtual void MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; + const std::vector<WebPluginGeometry>& moves) OVERRIDE; virtual void Focus() OVERRIDE; virtual void Blur() OVERRIDE; virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h index 63a680c..0c3455a 100644 --- a/content/browser/renderer_host/test_render_view_host.h +++ b/content/browser/renderer_host/test_render_view_host.h @@ -93,7 +93,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase { virtual void WasHidden() OVERRIDE {} virtual void MovePluginWindows( const gfx::Vector2d& scroll_offset, - const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE {} + const std::vector<WebPluginGeometry>& moves) OVERRIDE {} virtual void Focus() OVERRIDE {} virtual void Blur() OVERRIDE {} virtual void SetIsLoading(bool is_loading) OVERRIDE {} |