summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 00:23:26 +0000
committerchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 00:23:26 +0000
commitc85b0ba71b5a55647b01de9d345e46896979033d (patch)
treeae99657ca1440b7540da473e1bbe6156e43e9be3 /chrome
parent887ba3adc7b32b7df315ef292ae9395fd75653e5 (diff)
downloadchromium_src-c85b0ba71b5a55647b01de9d345e46896979033d.zip
chromium_src-c85b0ba71b5a55647b01de9d345e46896979033d.tar.gz
chromium_src-c85b0ba71b5a55647b01de9d345e46896979033d.tar.bz2
Revert "Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi"
Manually reverting r69755, which broke the tree. BUG=none TEST=none TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/5998002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/app/framework.order14
-rw-r--r--chrome/browser/automation/automation_provider.cc1
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc17
-rw-r--r--chrome/browser/dom_ui/plugins_ui.cc5
-rw-r--r--chrome/browser/gtk/content_setting_bubble_gtk.cc4
-rw-r--r--chrome/browser/hang_monitor/hung_plugin_action.cc6
-rw-r--r--chrome/browser/metrics/metrics_log.cc8
-rw-r--r--chrome/browser/metrics/metrics_log.h15
-rw-r--r--chrome/browser/metrics/metrics_service.cc19
-rw-r--r--chrome/browser/metrics/metrics_service.h9
-rw-r--r--chrome/browser/mock_plugin_exceptions_table_model.cc4
-rw-r--r--chrome/browser/mock_plugin_exceptions_table_model.h7
-rw-r--r--chrome/browser/plugin_carbon_interpose_mac.cc14
-rw-r--r--chrome/browser/plugin_data_remover.cc21
-rw-r--r--chrome/browser/plugin_data_remover.h2
-rw-r--r--chrome/browser/plugin_exceptions_table_model.cc6
-rw-r--r--chrome/browser/plugin_exceptions_table_model.h5
-rw-r--r--chrome/browser/plugin_exceptions_table_model_unittest.cc18
-rw-r--r--chrome/browser/plugin_installer.cc6
-rw-r--r--chrome/browser/plugin_process_host.cc2
-rw-r--r--chrome/browser/plugin_process_host.h10
-rw-r--r--chrome/browser/plugin_service.cc50
-rw-r--r--chrome/browser/plugin_service.h8
-rw-r--r--chrome/browser/plugin_service_browsertest.cc12
-rw-r--r--chrome/browser/plugin_service_unittest.cc1
-rw-r--r--chrome/browser/plugin_updater.cc45
-rw-r--r--chrome/browser/plugin_updater.h15
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_mac.cc4
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_mac.h6
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc4
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h7
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc14
-rw-r--r--chrome/browser/renderer_host/render_message_filter.cc32
-rw-r--r--chrome/browser/renderer_host/render_message_filter.h7
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view.h7
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc4
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.h6
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.h2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.mm12
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm4
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views.h2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.cc19
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.h2
-rw-r--r--chrome/browser/renderer_host/test/test_render_view_host.h2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc6
-rw-r--r--chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm24
-rw-r--r--chrome/common/chrome_plugin_lib.cc4
-rw-r--r--chrome/common/default_plugin.cc9
-rw-r--r--chrome/common/gpu_plugin.cc14
-rw-r--r--chrome/common/render_messages.cc34
-rw-r--r--chrome/common/render_messages.h23
-rw-r--r--chrome/common/render_messages_internal.h10
-rw-r--r--chrome/common/render_messages_params.h4
-rw-r--r--chrome/default_plugin/DEPS1
-rw-r--r--chrome/default_plugin/plugin_impl_gtk.cc4
-rw-r--r--chrome/default_plugin/plugin_impl_mac.mm4
-rw-r--r--chrome/default_plugin/plugin_impl_win.cc13
-rw-r--r--chrome/plugin/DEPS2
-rw-r--r--chrome/plugin/chrome_plugin_host.cc6
-rw-r--r--chrome/plugin/npobject_proxy.cc6
-rw-r--r--chrome/plugin/npobject_stub.cc4
-rw-r--r--chrome/plugin/npobject_util.cc4
-rw-r--r--chrome/plugin/plugin_channel.cc8
-rw-r--r--chrome/plugin/plugin_interpose_util_mac.mm18
-rw-r--r--chrome/plugin/plugin_thread.cc10
-rw-r--r--chrome/plugin/plugin_thread.h2
-rw-r--r--chrome/plugin/webplugin_accelerated_surface_proxy_mac.h4
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc19
-rw-r--r--chrome/plugin/webplugin_delegate_stub.h6
-rw-r--r--chrome/plugin/webplugin_proxy.cc10
-rw-r--r--chrome/plugin/webplugin_proxy.h24
-rw-r--r--chrome/renderer/blocked_plugin.cc14
-rw-r--r--chrome/renderer/blocked_plugin.h18
-rw-r--r--chrome/renderer/pepper_devices.cc4
-rw-r--r--chrome/renderer/pepper_devices_browsertest.cc21
-rw-r--r--chrome/renderer/pepper_plugin_delegate_impl.cc2
-rw-r--r--chrome/renderer/pepper_scrollbar_widget.cc2
-rw-r--r--chrome/renderer/pepper_widget.cc14
-rw-r--r--chrome/renderer/render_process_impl.cc4
-rw-r--r--chrome/renderer/render_view.cc46
-rw-r--r--chrome/renderer/render_view.h21
-rw-r--r--chrome/renderer/render_widget.cc4
-rw-r--r--chrome/renderer/render_widget.h8
-rw-r--r--chrome/renderer/renderer_glue.cc3
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.cc39
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.h22
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc17
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.h20
-rw-r--r--chrome/test/plugin/plugin_test.cpp7
91 files changed, 445 insertions, 556 deletions
diff --git a/chrome/app/framework.order b/chrome/app/framework.order
index 4ac4c01..71cb3d3 100644
--- a/chrome/app/framework.order
+++ b/chrome/app/framework.order
@@ -30,13 +30,13 @@ __ZN22mac_plugin_interposing31NotifyBrowserOfPluginHideWindowEj6CGRect
__ZN22mac_plugin_interposing28NotifyPluginOfSetThemeCursorEPvm
__ZN22mac_plugin_interposing23NotifyPluginOfSetCursorEPvPK6Cursor
__ZN22mac_plugin_interposing23GetPluginWindowHasFocusEPv
-__ZN6webkit5npapi25CarbonPluginWindowTrackerC1Ev
-__ZN6webkit5npapi25CarbonPluginWindowTrackerC2Ev
-__ZN6webkit5npapi25CarbonPluginWindowTracker14SharedInstanceEv
-__ZN6webkit5npapi25CarbonPluginWindowTracker28CreateDummyWindowForDelegateEPv
-__ZNK6webkit5npapi25CarbonPluginWindowTracker25GetDelegateForDummyWindowEP15OpaqueWindowPtr
-__ZNK6webkit5npapi25CarbonPluginWindowTracker25GetDummyWindowForDelegateEPv
-__ZN6webkit5npapi25CarbonPluginWindowTracker29DestroyDummyWindowForDelegateEPvP15OpaqueWindowPtr
+__ZN25CarbonPluginWindowTrackerC1Ev
+__ZN25CarbonPluginWindowTrackerC2Ev
+__ZN25CarbonPluginWindowTracker14SharedInstanceEv
+__ZN25CarbonPluginWindowTracker28CreateDummyWindowForDelegateEPv
+__ZNK25CarbonPluginWindowTracker25GetDelegateForDummyWindowEP15OpaqueWindowPtr
+__ZNK25CarbonPluginWindowTracker25GetDummyWindowForDelegateEPv
+__ZN25CarbonPluginWindowTracker29DestroyDummyWindowForDelegateEPvP15OpaqueWindowPtr
__ZN7WebCore22narrowPrecisionToFloatIdEEfT_
__ZN7WebCore24narrowPrecisionToCGFloatIdEEfT_
__ZnwmPv
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index 4108f69..be9e2d2 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -102,6 +102,7 @@
#include "chrome/browser/automation/ui_controls.h"
#include "views/event.h"
#include "webkit/glue/password_form.h"
+#include "webkit/glue/plugins/plugin_list.h"
#if defined(OS_WIN)
#include "chrome/browser/external_tab_container_win.h"
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 129dc8f..fcc609f 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -75,7 +75,7 @@
#include "net/base/cookie_store.h"
#include "net/url_request/url_request_context.h"
#include "views/event.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
namespace {
@@ -2993,11 +2993,10 @@ void TestingAutomationProvider::GetPluginsInfo(
Browser* browser,
DictionaryValue* args,
IPC::Message* reply_message) {
- std::vector<webkit::npapi::WebPluginInfo> plugins;
- webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<WebPluginInfo> plugins;
+ NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
ListValue* items = new ListValue;
- for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it =
- plugins.begin();
+ for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin();
it != plugins.end();
++it) {
DictionaryValue* item = new DictionaryValue;
@@ -3008,7 +3007,7 @@ void TestingAutomationProvider::GetPluginsInfo(
item->SetBoolean("enabled", it->enabled);
// Add info about mime types.
ListValue* mime_types = new ListValue();
- for (std::vector<webkit::npapi::WebPluginMimeType>::const_iterator type_it =
+ for (std::vector<WebPluginMimeType>::const_iterator type_it =
it->mime_types.begin();
type_it != it->mime_types.end();
++type_it) {
@@ -3047,8 +3046,7 @@ void TestingAutomationProvider::EnablePlugin(Browser* browser,
if (!args->GetString("path", &path)) {
reply.SendError("path not specified.");
return;
- } else if (!webkit::npapi::PluginList::Singleton()->EnablePlugin(
- FilePath(path))) {
+ } else if (!NPAPI::PluginList::Singleton()->EnablePlugin(FilePath(path))) {
reply.SendError(StringPrintf("Could not enable plugin for path %s.",
path.c_str()));
return;
@@ -3067,8 +3065,7 @@ void TestingAutomationProvider::DisablePlugin(Browser* browser,
if (!args->GetString("path", &path)) {
reply.SendError("path not specified.");
return;
- } else if (!webkit::npapi::PluginList::Singleton()->DisablePlugin(
- FilePath(path))) {
+ } else if (!NPAPI::PluginList::Singleton()->DisablePlugin(FilePath(path))) {
reply.SendError(StringPrintf("Could not disable plugin for path %s.",
path.c_str()));
return;
diff --git a/chrome/browser/dom_ui/plugins_ui.cc b/chrome/browser/dom_ui/plugins_ui.cc
index aaf59f1..6746fdd 100644
--- a/chrome/browser/dom_ui/plugins_ui.cc
+++ b/chrome/browser/dom_ui/plugins_ui.cc
@@ -32,7 +32,7 @@
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
namespace {
@@ -223,8 +223,7 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) {
plugin_updater->EnablePluginGroup(enable, group_name);
if (enable) {
// See http://crbug.com/50105 for background.
- string16 adobereader = ASCIIToUTF16(
- webkit::npapi::PluginGroup::kAdobeReaderGroupName);
+ string16 adobereader = ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName);
string16 internalpdf = ASCIIToUTF16(PepperPluginRegistry::kPDFPluginName);
if (group_name == adobereader) {
plugin_updater->EnablePluginGroup(false, internalpdf);
diff --git a/chrome/browser/gtk/content_setting_bubble_gtk.cc b/chrome/browser/gtk/content_setting_bubble_gtk.cc
index f8c36f0..a53d69c 100644
--- a/chrome/browser/gtk/content_setting_bubble_gtk.cc
+++ b/chrome/browser/gtk/content_setting_bubble_gtk.cc
@@ -27,7 +27,7 @@
#include "gfx/gtk_util.h"
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
namespace {
@@ -109,7 +109,7 @@ void ContentSettingBubbleGtk::BuildBubble() {
for (std::set<std::string>::const_iterator it = plugins.begin();
it != plugins.end(); ++it) {
std::string name = UTF16ToUTF8(
- webkit::npapi::PluginList::Singleton()->GetPluginGroupName(*it));
+ NPAPI::PluginList::Singleton()->GetPluginGroupName(*it));
if (name.empty())
name = *it;
diff --git a/chrome/browser/hang_monitor/hung_plugin_action.cc b/chrome/browser/hang_monitor/hung_plugin_action.cc
index 9b719ca..8399464 100644
--- a/chrome/browser/hang_monitor/hung_plugin_action.cc
+++ b/chrome/browser/hang_monitor/hung_plugin_action.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/platform_util.h"
#include "chrome/common/logging_chrome.h"
#include "grit/generated_resources.h"
-#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
+#include "webkit/glue/plugins/webplugin_delegate_impl.h"
HungPluginAction::HungPluginAction() : current_hung_plugin_window_(NULL) {
}
@@ -122,8 +122,8 @@ bool HungPluginAction::GetPluginName(HWND plugin_window,
// we have gone too far.
return false;
}
- if (webkit::npapi::WebPluginDelegateImpl::GetPluginNameFromWindow(
- window_to_check, plugin_name)) {
+ if (WebPluginDelegateImpl::GetPluginNameFromWindow(window_to_check,
+ plugin_name)) {
return true;
}
window_to_check = GetParent(window_to_check);
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index bf54134..d0a1f01 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -25,7 +25,6 @@
#include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h"
#include "googleurl/src/gurl.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
#define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name)
@@ -238,13 +237,12 @@ void MetricsLog::WriteRealtimeStabilityAttributes(PrefService* pref) {
}
void MetricsLog::WritePluginList(
- const std::vector<webkit::npapi::WebPluginInfo>& plugin_list) {
+ const std::vector<WebPluginInfo>& plugin_list) {
DCHECK(!locked_);
OPEN_ELEMENT_FOR_SCOPE("plugins");
- for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator iter =
- plugin_list.begin();
+ for (std::vector<WebPluginInfo>::const_iterator iter = plugin_list.begin();
iter != plugin_list.end(); ++iter) {
OPEN_ELEMENT_FOR_SCOPE("plugin");
@@ -264,7 +262,7 @@ void MetricsLog::WriteInstallElement() {
}
void MetricsLog::RecordEnvironment(
- const std::vector<webkit::npapi::WebPluginInfo>& plugin_list,
+ const std::vector<WebPluginInfo>& plugin_list,
const DictionaryValue* profile_metrics) {
DCHECK(!locked_);
diff --git a/chrome/browser/metrics/metrics_log.h b/chrome/browser/metrics/metrics_log.h
index 0cb8b29..8f35705 100644
--- a/chrome/browser/metrics/metrics_log.h
+++ b/chrome/browser/metrics/metrics_log.h
@@ -12,18 +12,13 @@
#include "base/basictypes.h"
#include "chrome/common/metrics_helpers.h"
#include "chrome/common/page_transition_types.h"
+#include "webkit/glue/plugins/webplugininfo.h"
struct AutocompleteLog;
class DictionaryValue;
class GURL;
class PrefService;
-namespace webkit {
-namespace npapi {
-struct WebPluginInfo;
-}
-}
-
class MetricsLog : public MetricsLogBase {
public:
// Creates a new metrics log
@@ -40,9 +35,8 @@ class MetricsLog : public MetricsLogBase {
// profile_metrics, if non-null, gives a dictionary of all profile metrics
// that are to be recorded. Each value in profile_metrics should be a
// dictionary giving the metrics for the profile.
- void RecordEnvironment(
- const std::vector<webkit::npapi::WebPluginInfo>& plugin_list,
- const DictionaryValue* profile_metrics);
+ void RecordEnvironment(const std::vector<WebPluginInfo>& plugin_list,
+ const DictionaryValue* profile_metrics);
// Records the input text, available choices, and selected entry when the
// user uses the Omnibox to open a URL.
@@ -86,8 +80,7 @@ class MetricsLog : public MetricsLogBase {
void WriteRealtimeStabilityAttributes(PrefService* pref);
// Writes the list of installed plugins.
- void WritePluginList(
- const std::vector<webkit::npapi::WebPluginInfo>& plugin_list);
+ void WritePluginList(const std::vector<WebPluginInfo>& plugin_list);
// Within the profile group, write basic install info including appversion.
void WriteInstallElement();
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 5e1af15..5aea04a 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -184,8 +184,8 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
+#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/glue/plugins/webplugininfo.h"
#include "libxml/xmlwriter.h"
// TODO(port): port browser_distribution.h.
@@ -336,9 +336,8 @@ class MetricsMemoryDetails : public MemoryDetails {
class MetricsService::InitTaskComplete : public Task {
public:
- explicit InitTaskComplete(
- const std::string& hardware_class,
- const std::vector<webkit::npapi::WebPluginInfo>& plugins)
+ explicit InitTaskComplete(const std::string& hardware_class,
+ const std::vector<WebPluginInfo>& plugins)
: hardware_class_(hardware_class), plugins_(plugins) {}
virtual void Run() {
@@ -348,7 +347,7 @@ class MetricsService::InitTaskComplete : public Task {
private:
std::string hardware_class_;
- std::vector<webkit::npapi::WebPluginInfo> plugins_;
+ std::vector<WebPluginInfo> plugins_;
};
class MetricsService::InitTask : public Task {
@@ -357,12 +356,12 @@ class MetricsService::InitTask : public Task {
: callback_loop_(callback_loop) {}
virtual void Run() {
- std::vector<webkit::npapi::WebPluginInfo> plugins;
- webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<WebPluginInfo> plugins;
+ NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
std::string hardware_class; // Empty string by default.
#if defined(OS_CHROMEOS)
chromeos::SystemLibrary* system_library =
- chromeos::CrosLibrary::Get()->GetSystemLibrary();
+ chromeos::CrosLibrary::Get()->GetSystemLibrary();
system_library->GetMachineStatistic("hardware_class", &hardware_class);
#endif // OS_CHROMEOS
callback_loop_->PostTask(FROM_HERE, new InitTaskComplete(
@@ -802,7 +801,7 @@ void MetricsService::InitializeMetricsState() {
void MetricsService::OnInitTaskComplete(
const std::string& hardware_class,
- const std::vector<webkit::npapi::WebPluginInfo>& plugins) {
+ const std::vector<WebPluginInfo>& plugins) {
DCHECK(state_ == INIT_TASK_SCHEDULED);
hardware_class_ = hardware_class;
plugins_ = plugins;
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h
index fa15a12..f1cfbb2 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -33,12 +33,7 @@ class HistogramSynchronizer;
class MetricsLogBase;
class PrefService;
class TemplateURLModel;
-
-namespace webkit {
-namespace npapi {
struct WebPluginInfo;
-}
-}
// Forward declaration of the xmlNode to avoid having tons of gyp files
// needing to depend on the libxml third party lib.
@@ -160,7 +155,7 @@ class MetricsService : public NotificationObserver,
// Callback to let us know that the init task is done.
void OnInitTaskComplete(
const std::string& hardware_class,
- const std::vector<webkit::npapi::WebPluginInfo>& plugins);
+ const std::vector<WebPluginInfo>& plugins);
// When we start a new version of Chromium (different from our last run), we
// need to discard the old crash stats so that we don't attribute crashes etc.
@@ -423,7 +418,7 @@ class MetricsService : public NotificationObserver,
std::string hardware_class_;
// The list of plugins which was retrieved on the file thread.
- std::vector<webkit::npapi::WebPluginInfo> plugins_;
+ std::vector<WebPluginInfo> plugins_;
// The outstanding transmission appears as a URL Fetch operation.
scoped_ptr<URLFetcher> current_fetch_;
diff --git a/chrome/browser/mock_plugin_exceptions_table_model.cc b/chrome/browser/mock_plugin_exceptions_table_model.cc
index 1c88524..77b2a2f 100644
--- a/chrome/browser/mock_plugin_exceptions_table_model.cc
+++ b/chrome/browser/mock_plugin_exceptions_table_model.cc
@@ -5,11 +5,11 @@
#include "chrome/browser/mock_plugin_exceptions_table_model.h"
void MockPluginExceptionsTableModel::set_plugins(
- std::vector<webkit::npapi::PluginGroup>& plugins) {
+ std::vector<PluginGroup>& plugins) {
plugins_ = plugins;
}
void MockPluginExceptionsTableModel::GetPlugins(
- std::vector<webkit::npapi::PluginGroup>* plugin_groups) {
+ std::vector<PluginGroup>* plugin_groups) {
*plugin_groups = plugins_;
}
diff --git a/chrome/browser/mock_plugin_exceptions_table_model.h b/chrome/browser/mock_plugin_exceptions_table_model.h
index c63d67f..15a1c5b 100644
--- a/chrome/browser/mock_plugin_exceptions_table_model.h
+++ b/chrome/browser/mock_plugin_exceptions_table_model.h
@@ -17,14 +17,13 @@ class MockPluginExceptionsTableModel : public PluginExceptionsTableModel {
: PluginExceptionsTableModel(map, otr_map) {}
virtual ~MockPluginExceptionsTableModel() {}
- void set_plugins(std::vector<webkit::npapi::PluginGroup>& plugins);
+ void set_plugins(std::vector<PluginGroup>& plugins);
protected:
- virtual void GetPlugins(
- std::vector<webkit::npapi::PluginGroup>* plugin_groups);
+ virtual void GetPlugins(std::vector<PluginGroup>* plugin_groups);
private:
- std::vector<webkit::npapi::PluginGroup> plugins_;
+ std::vector<PluginGroup> plugins_;
};
#endif // CHROME_BROWSER_MOCK_PLUGIN_EXCEPTIONS_TABLE_MODEL_H_
diff --git a/chrome/browser/plugin_carbon_interpose_mac.cc b/chrome/browser/plugin_carbon_interpose_mac.cc
index 2b60d66..55e1405 100644
--- a/chrome/browser/plugin_carbon_interpose_mac.cc
+++ b/chrome/browser/plugin_carbon_interpose_mac.cc
@@ -8,7 +8,7 @@
#include "chrome/plugin/plugin_interpose_util_mac.h"
#include "gfx/rect.h"
-#include "webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h"
+#include "webkit/glue/plugins/carbon_plugin_window_tracker_mac.h"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -61,16 +61,16 @@ static void OnPluginWindowSelected(WindowRef window) {
static Boolean ChromePluginIsWindowActive(WindowRef window) {
const OpaquePluginRef delegate =
- webkit::npapi::CarbonPluginWindowTracker::SharedInstance()->
- GetDelegateForDummyWindow(window);
+ CarbonPluginWindowTracker::SharedInstance()->GetDelegateForDummyWindow(
+ window);
return delegate ? IsContainingWindowActive(delegate)
: IsWindowActive(window);
}
static Boolean ChromePluginIsWindowHilited(WindowRef window) {
const OpaquePluginRef delegate =
- webkit::npapi::CarbonPluginWindowTracker::SharedInstance()->
- GetDelegateForDummyWindow(window);
+ CarbonPluginWindowTracker::SharedInstance()->GetDelegateForDummyWindow(
+ window);
return delegate ? IsContainingWindowActive(delegate)
: IsWindowHilited(window);
}
@@ -126,8 +126,8 @@ static void ChromePluginDisposeDialog(DialogRef dialog) {
static WindowPartCode ChromePluginFindWindow(Point point, WindowRef* window) {
OpaquePluginRef delegate = mac_plugin_interposing::GetActiveDelegate();
- webkit::npapi::CarbonPluginWindowTracker* tracker =
- webkit::npapi::CarbonPluginWindowTracker::SharedInstance();
+ CarbonPluginWindowTracker* tracker =
+ CarbonPluginWindowTracker::SharedInstance();
WindowRef plugin_window = tracker->GetDummyWindowForDelegate(delegate);
if (plugin_window) {
// If plugin_window is non-NULL, then we are in the middle of routing an
diff --git a/chrome/browser/plugin_data_remover.cc b/chrome/browser/plugin_data_remover.cc
index fd7d9bd..74aa07c 100644
--- a/chrome/browser/plugin_data_remover.cc
+++ b/chrome/browser/plugin_data_remover.cc
@@ -10,8 +10,8 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/plugin_service.h"
#include "chrome/common/plugin_messages.h"
-#include "webkit/plugins/npapi/plugin_group.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_group.h"
+#include "webkit/glue/plugins/plugin_list.h"
#if defined(OS_POSIX)
#include "ipc/ipc_channel_posix.h"
@@ -65,8 +65,7 @@ bool PluginDataRemover::OffTheRecord() {
return false;
}
-void PluginDataRemover::SetPluginInfo(
- const webkit::npapi::WebPluginInfo& info) {
+void PluginDataRemover::SetPluginInfo(const WebPluginInfo& info) {
}
void PluginDataRemover::OnChannelOpened(const IPC::ChannelHandle& handle) {
@@ -143,16 +142,16 @@ void PluginDataRemover::SignalDone() {
bool PluginDataRemover::IsSupported() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
bool allow_wildcard = false;
- webkit::npapi::WebPluginInfo plugin;
+ WebPluginInfo plugin;
std::string mime_type;
- if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(GURL(),
- g_flash_mime_type,
- allow_wildcard,
- &plugin,
- &mime_type))
+ if (!NPAPI::PluginList::Singleton()->GetPluginInfo(GURL(),
+ g_flash_mime_type,
+ allow_wildcard,
+ &plugin,
+ &mime_type))
return false;
scoped_ptr<Version> version(
- webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version));
+ PluginGroup::CreateVersionFromString(plugin.version));
scoped_ptr<Version> min_version(
Version::GetVersionFromString(g_min_flash_version));
return plugin.enabled &&
diff --git a/chrome/browser/plugin_data_remover.h b/chrome/browser/plugin_data_remover.h
index 58387fe..03b7e6f 100644
--- a/chrome/browser/plugin_data_remover.h
+++ b/chrome/browser/plugin_data_remover.h
@@ -41,7 +41,7 @@ class PluginDataRemover : public base::RefCountedThreadSafe<PluginDataRemover>,
// PluginProcessHost::Client methods
virtual int ID();
virtual bool OffTheRecord();
- virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info);
+ virtual void SetPluginInfo(const WebPluginInfo& info);
virtual void OnChannelOpened(const IPC::ChannelHandle& handle);
virtual void OnError();
diff --git a/chrome/browser/plugin_exceptions_table_model.cc b/chrome/browser/plugin_exceptions_table_model.cc
index 5b2a2c1..7ad5b13 100644
--- a/chrome/browser/plugin_exceptions_table_model.cc
+++ b/chrome/browser/plugin_exceptions_table_model.cc
@@ -134,13 +134,13 @@ void PluginExceptionsTableModel::ClearSettings() {
}
void PluginExceptionsTableModel::GetPlugins(
- std::vector<webkit::npapi::PluginGroup>* plugin_groups) {
- webkit::npapi::PluginList::Singleton()->GetPluginGroups(false, plugin_groups);
+ std::vector<PluginGroup>* plugin_groups) {
+ NPAPI::PluginList::Singleton()->GetPluginGroups(false, plugin_groups);
}
void PluginExceptionsTableModel::LoadSettings() {
int group_id = 0;
- std::vector<webkit::npapi::PluginGroup> plugins;
+ std::vector<PluginGroup> plugins;
GetPlugins(&plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
std::string plugin = plugins[i].identifier();
diff --git a/chrome/browser/plugin_exceptions_table_model.h b/chrome/browser/plugin_exceptions_table_model.h
index 045c218..d345b95 100644
--- a/chrome/browser/plugin_exceptions_table_model.h
+++ b/chrome/browser/plugin_exceptions_table_model.h
@@ -13,7 +13,7 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/remove_rows_table_model.h"
#include "chrome/common/notification_observer.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
struct WebPluginInfo;
@@ -48,8 +48,7 @@ class PluginExceptionsTableModel : public RemoveRowsTableModel,
protected:
// Subclasses can override this method for testing.
- virtual void GetPlugins(
- std::vector<webkit::npapi::PluginGroup>* plugin_groups);
+ virtual void GetPlugins(std::vector<PluginGroup>* plugin_groups);
private:
friend class PluginExceptionsTableModelTest;
diff --git a/chrome/browser/plugin_exceptions_table_model_unittest.cc b/chrome/browser/plugin_exceptions_table_model_unittest.cc
index e7efcca..b96f3fb 100644
--- a/chrome/browser/plugin_exceptions_table_model_unittest.cc
+++ b/chrome/browser/plugin_exceptions_table_model_unittest.cc
@@ -13,8 +13,8 @@
#include "chrome/test/testing_profile.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/plugins/npapi/plugin_group.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
+#include "webkit/glue/plugins/plugin_group.h"
+#include "webkit/glue/plugins/webplugininfo.h"
// Can't be an internal namespace because PluginExceptionsTableModel declares
// as a friend.
@@ -85,21 +85,21 @@ class PluginExceptionsTableModelTest : public testing::Test {
table_model_.reset(new MockPluginExceptionsTableModel(map, NULL));
- std::vector<webkit::npapi::PluginGroup> plugins;
- webkit::npapi::WebPluginInfo foo_plugin;
+ std::vector<PluginGroup> plugins;
+ WebPluginInfo foo_plugin;
foo_plugin.path = FilePath(FILE_PATH_LITERAL("a-foo"));
foo_plugin.name = ASCIIToUTF16("FooPlugin");
foo_plugin.enabled = true;
- scoped_ptr<webkit::npapi::PluginGroup> foo_group(
- webkit::npapi::PluginGroup::FromWebPluginInfo(foo_plugin));
+ scoped_ptr<PluginGroup> foo_group(
+ PluginGroup::FromWebPluginInfo(foo_plugin));
plugins.push_back(*foo_group);
- webkit::npapi::WebPluginInfo bar_plugin;
+ WebPluginInfo bar_plugin;
bar_plugin.path = FilePath(FILE_PATH_LITERAL("b-bar"));
bar_plugin.name = ASCIIToUTF16("BarPlugin");
bar_plugin.enabled = true;
- scoped_ptr<webkit::npapi::PluginGroup> bar_group(
- webkit::npapi::PluginGroup::FromWebPluginInfo(bar_plugin));
+ scoped_ptr<PluginGroup> bar_group(
+ PluginGroup::FromWebPluginInfo(bar_plugin));
plugins.push_back(*bar_group);
table_model_->set_plugins(plugins);
diff --git a/chrome/browser/plugin_installer.cc b/chrome/browser/plugin_installer.cc
index 8d63679..b6ceb3c 100644
--- a/chrome/browser/plugin_installer.cc
+++ b/chrome/browser/plugin_installer.cc
@@ -12,7 +12,7 @@
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
-#include "webkit/plugins/npapi/default_plugin_shared.h"
+#include "webkit/glue/plugins/default_plugin_shared.h"
// The URL for the "Problems installing" page for the Plugins infobar.
static const char kLearnMorePluginInstallerUrl[] =
@@ -30,11 +30,11 @@ PluginInstaller::~PluginInstaller() {
void PluginInstaller::OnMissingPluginStatus(int status) {
switch (status) {
- case webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE: {
+ case default_plugin::MISSING_PLUGIN_AVAILABLE: {
tab_contents_->AddInfoBar(this);
break;
}
- case webkit::npapi::default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: {
+ case default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: {
// Hide the InfoBar if user already started download/install of the
// missing plugin.
tab_contents_->RemoveInfoBar(this);
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 72d8aed..0e7735a 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -169,7 +169,7 @@ PluginProcessHost::~PluginProcessHost() {
CancelRequests();
}
-bool PluginProcessHost::Init(const webkit::npapi::WebPluginInfo& info,
+bool PluginProcessHost::Init(const WebPluginInfo& info,
const std::string& locale) {
info_ = info;
set_name(UTF16ToWideHack(info_.name));
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index b98840e..89e368a 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -18,7 +18,7 @@
#include "chrome/browser/browser_child_process_host.h"
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
#include "gfx/native_widget_types.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
+#include "webkit/glue/plugins/webplugininfo.h"
namespace gfx {
class Rect;
@@ -47,7 +47,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
// the channel.
virtual int ID() = 0;
virtual bool OffTheRecord() = 0;
- virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) = 0;
+ virtual void SetPluginInfo(const WebPluginInfo& info) = 0;
// The client should delete itself when one of these methods is called.
virtual void OnChannelOpened(const IPC::ChannelHandle& handle) = 0;
virtual void OnError() = 0;
@@ -61,7 +61,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
// Initialize the new plugin process, returning true on success. This must
// be called before the object can be used.
- bool Init(const webkit::npapi::WebPluginInfo& info, const std::string& locale);
+ bool Init(const WebPluginInfo& info, const std::string& locale);
// Force the plugin process to shutdown (cleanly).
virtual void ForceShutdown();
@@ -92,7 +92,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
void OnAppActivation();
#endif
- const webkit::npapi::WebPluginInfo& info() const { return info_; }
+ const WebPluginInfo& info() const { return info_; }
#if defined(OS_WIN)
// Tracks plugin parent windows created on the browser UI thread.
@@ -150,7 +150,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
std::queue<Client*> sent_requests_;
// Information about the plugin.
- webkit::npapi::WebPluginInfo info_;
+ WebPluginInfo info_;
// Helper class for handling PluginProcessHost_ResolveProxy messages (manages
// the requests to the proxy service).
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index 50677f7..548bd3c 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -34,13 +34,12 @@
#include "chrome/common/plugin_messages.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
-#include "webkit/plugins/npapi/plugin_constants_win.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
-
#ifndef DISABLE_NACL
#include "native_client/src/trusted/plugin/nacl_entry_points.h"
#endif
+#include "webkit/glue/plugins/plugin_constants_win.h"
+#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/glue/plugins/webplugininfo.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/plugin_selection_policy.h"
@@ -95,10 +94,10 @@ PluginService::PluginService()
const CommandLine* command_line = CommandLine::ForCurrentProcess();
FilePath path = command_line->GetSwitchValuePath(switches::kLoadPlugin);
if (!path.empty())
- webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
+ NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
path = command_line->GetSwitchValuePath(switches::kExtraPluginDir);
if (!path.empty())
- webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(path);
+ NPAPI::PluginList::Singleton()->AddExtraPluginDir(path);
chrome::RegisterInternalDefaultPlugin();
@@ -106,7 +105,7 @@ PluginService::PluginService()
if (!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableInternalFlash) &&
PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) {
- webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
+ NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
}
#ifndef DISABLE_NACL
@@ -124,9 +123,9 @@ PluginService::PluginService()
#if defined(OS_WIN)
hkcu_key_.Create(
- HKEY_CURRENT_USER, webkit::npapi::kRegistryMozillaPlugins, KEY_NOTIFY);
+ HKEY_CURRENT_USER, kRegistryMozillaPlugins, KEY_NOTIFY);
hklm_key_.Create(
- HKEY_LOCAL_MACHINE, webkit::npapi::kRegistryMozillaPlugins, KEY_NOTIFY);
+ HKEY_LOCAL_MACHINE, kRegistryMozillaPlugins, KEY_NOTIFY);
if (hkcu_key_.StartWatching()) {
hkcu_event_.reset(new base::WaitableEvent(hkcu_key_.watch_event()));
hkcu_watcher_.StartWatching(hkcu_event_.get(), this);
@@ -141,7 +140,7 @@ PluginService::PluginService()
// e.g. ~/.config/chromium/Plugins.
FilePath user_data_dir;
if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
- webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(
+ NPAPI::PluginList::Singleton()->AddExtraPluginDir(
user_data_dir.Append("Plugins"));
}
#endif
@@ -213,9 +212,9 @@ PluginProcessHost* PluginService::FindOrStartPluginProcess(
if (plugin_host)
return plugin_host;
- webkit::npapi::WebPluginInfo info;
- if (!webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath(
- plugin_path, &info)) {
+ WebPluginInfo info;
+ if (!NPAPI::PluginList::Singleton()->GetPluginInfoByPath(
+ plugin_path, &info)) {
return NULL;
}
@@ -247,7 +246,7 @@ void PluginService::GetAllowedPluginForOpenChannelToPlugin(
const std::string& mime_type,
PluginProcessHost::Client* client) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- webkit::npapi::WebPluginInfo info;
+ WebPluginInfo info;
bool found = GetFirstAllowedPluginInfo(url, mime_type, &info, NULL);
FilePath plugin_path;
if (found && info.enabled)
@@ -276,16 +275,16 @@ void PluginService::FinishOpenChannelToPlugin(
bool PluginService::GetFirstAllowedPluginInfo(
const GURL& url,
const std::string& mime_type,
- webkit::npapi::WebPluginInfo* info,
+ WebPluginInfo* info,
std::string* actual_mime_type) {
// GetPluginInfoArray may need to load the plugins, so we need to be
// on the FILE thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
bool allow_wildcard = true;
#if defined(OS_CHROMEOS)
- std::vector<webkit::npapi::WebPluginInfo> info_array;
+ std::vector<WebPluginInfo> info_array;
std::vector<std::string> actual_mime_types;
- webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
+ NPAPI::PluginList::Singleton()->GetPluginInfoArray(
url, mime_type, allow_wildcard, &info_array, &actual_mime_types);
// Now we filter by the plugin selection policy.
@@ -299,7 +298,7 @@ bool PluginService::GetFirstAllowedPluginInfo(
}
return false;
#else
- return webkit::npapi::PluginList::Singleton()->GetPluginInfo(
+ return NPAPI::PluginList::Singleton()->GetPluginInfo(
url, mime_type, allow_wildcard, info, actual_mime_type);
#endif
}
@@ -320,7 +319,7 @@ void PluginService::OnWaitableEventSignaled(
hklm_key_.StartWatching();
}
- webkit::npapi::PluginList::Singleton()->RefreshPlugins();
+ NPAPI::PluginList::Singleton()->RefreshPlugins();
PurgePluginListCache(true);
#endif // defined(OS_WIN)
}
@@ -341,8 +340,8 @@ void PluginService::Observe(NotificationType type,
bool plugins_changed = false;
for (size_t i = 0; i < extension->plugins().size(); ++i) {
const Extension::PluginInfo& plugin = extension->plugins()[i];
- webkit::npapi::PluginList::Singleton()->RefreshPlugins();
- webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(plugin.path);
+ NPAPI::PluginList::Singleton()->RefreshPlugins();
+ NPAPI::PluginList::Singleton()->AddExtraPluginPath(plugin.path);
plugins_changed = true;
if (!plugin.is_public)
private_plugins_[plugin.path] = extension->url();
@@ -360,9 +359,8 @@ void PluginService::Observe(NotificationType type,
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableFunction(&ForceShutdownPlugin,
plugin.path));
- webkit::npapi::PluginList::Singleton()->RefreshPlugins();
- webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath(
- plugin.path);
+ NPAPI::PluginList::Singleton()->RefreshPlugins();
+ NPAPI::PluginList::Singleton()->RemoveExtraPluginPath(plugin.path);
plugins_changed = true;
if (!plugin.is_public)
private_plugins_.erase(plugin.path);
@@ -409,7 +407,7 @@ void PluginService::RegisterPepperPlugins() {
std::vector<PepperPluginInfo> plugins;
PepperPluginRegistry::GetList(&plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
- webkit::npapi::PluginVersionInfo info;
+ NPAPI::PluginVersionInfo info;
info.path = plugins[i].path;
info.product_name = plugins[i].name.empty() ?
plugins[i].path.BaseName().ToWStringHack() :
@@ -424,6 +422,6 @@ void PluginService::RegisterPepperPlugins() {
// or perhaps refactor the PluginList to be less specific to NPAPI.
memset(&info.entry_points, 0, sizeof(info.entry_points));
- webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info);
+ NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info);
}
}
diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h
index a66d76ac..e83e804 100644
--- a/chrome/browser/plugin_service.h
+++ b/chrome/browser/plugin_service.h
@@ -41,13 +41,7 @@ class MessageLoop;
class Profile;
class ResourceDispatcherHost;
class URLRequestContext;
-
-
-namespace webkit {
-namespace npapi {
struct WebPluginInfo;
-}
-}
// This must be created on the main thread but it's only called on the IO/file
// thread.
@@ -96,7 +90,7 @@ class PluginService
// the given url and mime type. Must be called on the FILE thread.
bool GetFirstAllowedPluginInfo(const GURL& url,
const std::string& mime_type,
- webkit::npapi::WebPluginInfo* info,
+ WebPluginInfo* info,
std::string* actual_mime_type);
// Returns true if the given plugin is allowed to be used by a page with
diff --git a/chrome/browser/plugin_service_browsertest.cc b/chrome/browser/plugin_service_browsertest.cc
index 5fed897..8d9e82e 100644
--- a/chrome/browser/plugin_service_browsertest.cc
+++ b/chrome/browser/plugin_service_browsertest.cc
@@ -11,7 +11,7 @@
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
namespace {
@@ -26,7 +26,7 @@ class MockPluginProcessHostClient : public PluginProcessHost::Client {
MOCK_METHOD0(ID, int());
MOCK_METHOD0(OffTheRecord, bool());
- MOCK_METHOD1(SetPluginInfo, void(const webkit::npapi::WebPluginInfo& info));
+ MOCK_METHOD1(SetPluginInfo, void(const WebPluginInfo& info));
MOCK_METHOD1(OnChannelOpened, void(const IPC::ChannelHandle& handle));
MOCK_METHOD0(OnError, void());
@@ -73,10 +73,10 @@ IN_PROC_BROWSER_TEST_F(PluginServiceTest, StartAndFindPluginProcess) {
// calls to FindPluginProcess should return non-zero values.
PluginProcessHost* default_plugin_process_host =
plugin_service_->FindOrStartPluginProcess(
- FilePath(webkit::npapi::kDefaultPluginLibraryName));
+ FilePath(kDefaultPluginLibraryName));
- EXPECT_EQ(default_plugin_process_host, plugin_service_->FindPluginProcess(
- FilePath(webkit::npapi::kDefaultPluginLibraryName)));
+ EXPECT_EQ(default_plugin_process_host,
+ plugin_service_->FindPluginProcess(FilePath(kDefaultPluginLibraryName)));
}
IN_PROC_BROWSER_TEST_F(PluginServiceTest, OpenChannelToPlugin) {
@@ -95,7 +95,7 @@ IN_PROC_BROWSER_TEST_F(PluginServiceTest, GetFirstAllowedPluginInfo) {
// We should always get a positive response no matter whether we really have
// a plugin to support that particular mime type because the Default plugin
// supports all mime types.
- webkit::npapi::WebPluginInfo plugin_info;
+ WebPluginInfo plugin_info;
std::string plugin_mime_type;
plugin_service_->GetFirstAllowedPluginInfo(GURL("http://google.com/"),
"application/pdf",
diff --git a/chrome/browser/plugin_service_unittest.cc b/chrome/browser/plugin_service_unittest.cc
index 6950d2a..4e54526 100644
--- a/chrome/browser/plugin_service_unittest.cc
+++ b/chrome/browser/plugin_service_unittest.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "webkit/glue/plugins/plugin_list.h"
namespace {
diff --git a/chrome/browser/plugin_updater.cc b/chrome/browser/plugin_updater.cc
index d994efd..40f3be1 100644
--- a/chrome/browser/plugin_updater.cc
+++ b/chrome/browser/plugin_updater.cc
@@ -22,8 +22,7 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/pepper_plugin_registry.h"
#include "chrome/common/pref_names.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
+#include "webkit/glue/plugins/webplugininfo.h"
// How long to wait to save the plugin enabled information, which might need to
// go to disk.
@@ -35,7 +34,7 @@ PluginUpdater::PluginUpdater()
}
DictionaryValue* PluginUpdater::CreatePluginFileSummary(
- const webkit::npapi::WebPluginInfo& plugin) {
+ const WebPluginInfo& plugin) {
DictionaryValue* data = new DictionaryValue();
data->SetString("path", plugin.path.value());
data->SetString("name", plugin.name);
@@ -46,8 +45,8 @@ DictionaryValue* PluginUpdater::CreatePluginFileSummary(
// static
ListValue* PluginUpdater::GetPluginGroupsData() {
- std::vector<webkit::npapi::PluginGroup> plugin_groups;
- webkit::npapi::PluginList::Singleton()->GetPluginGroups(true, &plugin_groups);
+ std::vector<PluginGroup> plugin_groups;
+ NPAPI::PluginList::Singleton()->GetPluginGroups(true, &plugin_groups);
// Construct DictionaryValues to return to the UI
ListValue* plugin_groups_data = new ListValue();
@@ -58,20 +57,19 @@ ListValue* PluginUpdater::GetPluginGroupsData() {
}
void PluginUpdater::EnablePluginGroup(bool enable, const string16& group_name) {
- if (webkit::npapi::PluginGroup::IsPluginNameDisabledByPolicy(group_name))
+ if (PluginGroup::IsPluginNameDisabledByPolicy(group_name))
enable = false;
- webkit::npapi::PluginList::Singleton()->EnableGroup(enable, group_name);
+ NPAPI::PluginList::Singleton()->EnableGroup(enable, group_name);
NotifyPluginStatusChanged();
}
void PluginUpdater::EnablePluginFile(bool enable,
const FilePath::StringType& path) {
FilePath file_path(path);
- if (enable &&
- !webkit::npapi::PluginGroup::IsPluginPathDisabledByPolicy(file_path))
- webkit::npapi::PluginList::Singleton()->EnablePlugin(file_path);
+ if (enable && !PluginGroup::IsPluginPathDisabledByPolicy(file_path))
+ NPAPI::PluginList::Singleton()->EnablePlugin(file_path);
else
- webkit::npapi::PluginList::Singleton()->DisablePlugin(file_path);
+ NPAPI::PluginList::Singleton()->DisablePlugin(file_path);
NotifyPluginStatusChanged();
}
@@ -107,8 +105,7 @@ void PluginUpdater::DisablePluginsFromPolicy(const ListValue* plugin_names) {
}
}
}
- webkit::npapi::PluginGroup::SetPolicyDisabledPluginPatterns(
- policy_disabled_plugin_patterns);
+ PluginGroup::SetPolicyDisabledPluginPatterns(policy_disabled_plugin_patterns);
NotifyPluginStatusChanged();
}
@@ -193,7 +190,7 @@ void PluginUpdater::DisablePluginGroupsFromPrefs(Profile* profile) {
}
}
if (!enabled)
- webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_path);
+ NPAPI::PluginList::Singleton()->DisablePlugin(plugin_path);
} else if (!enabled && plugin->GetString("name", &group_name)) {
// Don't disable this group if it's for the pdf plugin and we just
// forced it on.
@@ -216,14 +213,13 @@ void PluginUpdater::DisablePluginGroupsFromPrefs(Profile* profile) {
!force_internal_pdf_for_this_run) {
// The internal PDF plugin is disabled by default, and the user hasn't
// overridden the default.
- webkit::npapi::PluginList::Singleton()->DisablePlugin(pdf_path);
+ NPAPI::PluginList::Singleton()->DisablePlugin(pdf_path);
EnablePluginGroup(false, pdf_group_name);
}
if (force_enable_internal_pdf) {
// See http://crbug.com/50105 for background.
- EnablePluginGroup(false, ASCIIToUTF16(
- webkit::npapi::PluginGroup::kAdobeReaderGroupName));
+ EnablePluginGroup(false, ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName));
// We want to save this, but doing so requires loading the list of plugins,
// so do it after a minute as to not impact startup performance. Note that
@@ -241,11 +237,11 @@ void PluginUpdater::UpdatePreferences(Profile* profile, int delay_ms) {
}
void PluginUpdater::GetPreferencesDataOnFileThread(void* profile) {
- std::vector<webkit::npapi::WebPluginInfo> plugins;
- webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<WebPluginInfo> plugins;
+ NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
- std::vector<webkit::npapi::PluginGroup> groups;
- webkit::npapi::PluginList::Singleton()->GetPluginGroups(false, &groups);
+ std::vector<PluginGroup> groups;
+ NPAPI::PluginList::Singleton()->GetPluginGroups(false, &groups);
BrowserThread::PostTask(
BrowserThread::UI,
@@ -257,8 +253,8 @@ void PluginUpdater::GetPreferencesDataOnFileThread(void* profile) {
void PluginUpdater::OnUpdatePreferences(
Profile* profile,
- const std::vector<webkit::npapi::WebPluginInfo>& plugins,
- const std::vector<webkit::npapi::PluginGroup>& groups) {
+ const std::vector<WebPluginInfo>& plugins,
+ const std::vector<PluginGroup>& groups) {
ListValue* plugins_list = profile->GetPrefs()->GetMutableList(
prefs::kPluginsPluginsList);
plugins_list->Clear();
@@ -269,8 +265,7 @@ void PluginUpdater::OnUpdatePreferences(
internal_dir);
// Add the plugin files.
- for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it =
- plugins.begin();
+ for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin();
it != plugins.end();
++it) {
plugins_list->Append(CreatePluginFileSummary(*it));
diff --git a/chrome/browser/plugin_updater.h b/chrome/browser/plugin_updater.h
index dc18595..5264334 100644
--- a/chrome/browser/plugin_updater.h
+++ b/chrome/browser/plugin_updater.h
@@ -12,19 +12,15 @@
#include "base/file_path.h"
#include "base/singleton.h"
#include "chrome/common/notification_observer.h"
+#include "webkit/glue/plugins/plugin_list.h"
class DictionaryValue;
class ListValue;
class NotificationDetails;
class NotificationSource;
-class Profile;
-
-namespace webkit {
-namespace npapi {
class PluginGroup;
+class Profile;
struct WebPluginInfo;
-}
-}
class PluginUpdater : public NotificationObserver {
public:
@@ -62,8 +58,8 @@ class PluginUpdater : public NotificationObserver {
// Called on the UI thread with the plugin data to save the preferences.
static void OnUpdatePreferences(
Profile* profile,
- const std::vector<webkit::npapi::WebPluginInfo>& plugins,
- const std::vector<webkit::npapi::PluginGroup>& groups);
+ const std::vector<WebPluginInfo>& plugins,
+ const std::vector<PluginGroup>& groups);
// Queues sending the notification that plugin data has changed. This is done
// so that if a bunch of changes happen, we only send one notification.
@@ -72,8 +68,7 @@ class PluginUpdater : public NotificationObserver {
// Used for the post task to notify that plugin enabled status changed.
static void OnNotifyPluginStatusChanged();
- static DictionaryValue* CreatePluginFileSummary(
- const webkit::npapi::WebPluginInfo& plugin);
+ static DictionaryValue* CreatePluginFileSummary(const WebPluginInfo& plugin);
// Force plugins to be disabled due to policy. |plugins| contains
// the list of StringValues of the names of the policy-disabled plugins.
diff --git a/chrome/browser/renderer_host/accelerated_surface_container_mac.cc b/chrome/browser/renderer_host/accelerated_surface_container_mac.cc
index f379931..1a7c07c 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_mac.cc
+++ b/chrome/browser/renderer_host/accelerated_surface_container_mac.cc
@@ -7,7 +7,7 @@
#include "app/surface/io_surface_support_mac.h"
#include "base/logging.h"
#include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h"
-#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/glue/plugins/webplugin.h"
AcceleratedSurfaceContainerMac::AcceleratedSurfaceContainerMac(
AcceleratedSurfaceContainerManagerMac* manager,
@@ -51,7 +51,7 @@ void AcceleratedSurfaceContainerMac::SetSizeAndTransportDIB(
}
void AcceleratedSurfaceContainerMac::SetGeometry(
- const webkit::npapi::WebPluginGeometry& geom) {
+ const webkit_glue::WebPluginGeometry& geom) {
visible_ = geom.visible;
if (geom.rects_valid)
clip_rect_ = geom.clip_rect;
diff --git a/chrome/browser/renderer_host/accelerated_surface_container_mac.h b/chrome/browser/renderer_host/accelerated_surface_container_mac.h
index 45979e0..deda9ef 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_mac.h
+++ b/chrome/browser/renderer_host/accelerated_surface_container_mac.h
@@ -36,11 +36,9 @@
#include "gfx/native_widget_types.h"
#include "gfx/rect.h"
-namespace webkit {
-namespace npapi {
+namespace webkit_glue {
struct WebPluginGeometry;
}
-}
class AcceleratedSurfaceContainerManagerMac;
@@ -67,7 +65,7 @@ class AcceleratedSurfaceContainerMac {
// currently only pays attention to the clip width and height, since the
// view in which it is hosted is responsible for positioning it on the
// page.)
- void SetGeometry(const webkit::npapi::WebPluginGeometry& geom);
+ void SetGeometry(const webkit_glue::WebPluginGeometry& geom);
// Draws this accelerated surface's contents, texture mapped onto a quad in
// the given OpenGL context. TODO(kbr): figure out and define exactly how the
diff --git a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc
index a96782b..1ad09ba 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc
+++ b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "chrome/browser/renderer_host/accelerated_surface_container_mac.h"
-#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/glue/plugins/webplugin.h"
AcceleratedSurfaceContainerManagerMac::AcceleratedSurfaceContainerManagerMac()
: current_id_(0),
@@ -86,7 +86,7 @@ void AcceleratedSurfaceContainerManagerMac::SetSizeAndTransportDIB(
}
void AcceleratedSurfaceContainerManagerMac::SetPluginContainerGeometry(
- const webkit::npapi::WebPluginGeometry& move) {
+ const webkit_glue::WebPluginGeometry& move) {
AutoLock lock(lock_);
AcceleratedSurfaceContainerMac* container = MapIDToContainer(move.window);
diff --git a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
index a2855a4..a03a5c4 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
+++ b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
@@ -14,11 +14,9 @@
#include "base/lock.h"
#include "gfx/native_widget_types.h"
-namespace webkit {
-namespace npapi {
+namespace webkit_glue {
struct WebPluginGeometry;
}
-}
class AcceleratedSurfaceContainerMac;
@@ -65,8 +63,7 @@ class AcceleratedSurfaceContainerManagerMac {
// Takes an update from WebKit about a plugin's position and size and moves
// the plugin accordingly.
- void SetPluginContainerGeometry(
- const webkit::npapi::WebPluginGeometry& move);
+ void SetPluginContainerGeometry(const webkit_glue::WebPluginGeometry& move);
// Draws the plugin container associated with the given id into the given
// OpenGL context, which must already be current.
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index bc35c42..82ca861 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -22,7 +22,7 @@
#include "net/base/mime_util.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
namespace {
@@ -422,18 +422,18 @@ bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) {
return false;
if (need_plugin_list) {
- if (!webkit::npapi::PluginList::Singleton()->PluginsLoaded()) {
+ if (!NPAPI::PluginList::Singleton()->PluginsLoaded()) {
*need_plugin_list = true;
return true;
}
} else {
- DCHECK(webkit::npapi::PluginList::Singleton()->PluginsLoaded());
+ DCHECK(NPAPI::PluginList::Singleton()->PluginsLoaded());
}
// Finally, check the plugin list.
- webkit::npapi::WebPluginInfo info;
+ WebPluginInfo info;
bool allow_wildcard = false;
- return !webkit::npapi::PluginList::Singleton()->GetPluginInfo(
+ return !NPAPI::PluginList::Singleton()->GetPluginInfo(
GURL(), type, allow_wildcard, &info, NULL) || !info.enabled;
}
@@ -469,8 +469,8 @@ void BufferedResourceHandler::UseAlternateResourceHandler(
}
void BufferedResourceHandler::LoadPlugins() {
- std::vector<webkit::npapi::WebPluginInfo> plugins;
- webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<WebPluginInfo> plugins;
+ NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
diff --git a/chrome/browser/renderer_host/render_message_filter.cc b/chrome/browser/renderer_host/render_message_filter.cc
index 453e5c5..ad49440 100644
--- a/chrome/browser/renderer_host/render_message_filter.cc
+++ b/chrome/browser/renderer_host/render_message_filter.cc
@@ -65,11 +65,11 @@
#include "net/url_request/url_request_context.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h"
#include "webkit/glue/context_menu.h"
+#include "webkit/glue/plugins/plugin_group.h"
+#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webcookie.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/plugins/npapi/plugin_group.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-#include "webkit/plugins/npapi/webplugin.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/plugin_selection_policy.h"
@@ -200,7 +200,7 @@ class OpenChannelToPluginCallback : public PluginProcessHost::Client {
return filter_->off_the_record();
}
- virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) {
+ virtual void SetPluginInfo(const WebPluginInfo& info) {
info_ = info;
}
@@ -223,7 +223,7 @@ class OpenChannelToPluginCallback : public PluginProcessHost::Client {
scoped_refptr<RenderMessageFilter> filter_;
IPC::Message* reply_msg_;
- webkit::npapi::WebPluginInfo info_;
+ WebPluginInfo info_;
};
} // namespace
@@ -684,8 +684,8 @@ void RenderMessageFilter::OnGetPlugins(bool refresh,
void RenderMessageFilter::OnGetPluginsOnFileThread(
bool refresh, IPC::Message* reply_msg) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- std::vector<webkit::npapi::WebPluginInfo> plugins;
- webkit::npapi::PluginList::Singleton()->GetEnabledPlugins(refresh, &plugins);
+ std::vector<WebPluginInfo> plugins;
+ NPAPI::PluginList::Singleton()->GetEnabledPlugins(refresh, &plugins);
ViewHostMsg_GetPlugins::WriteReplyParams(reply_msg, plugins);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -711,7 +711,7 @@ void RenderMessageFilter::OnGetPluginInfoOnFileThread(
const std::string& mime_type,
IPC::Message* reply_msg) {
std::string actual_mime_type;
- webkit::npapi::WebPluginInfo info;
+ WebPluginInfo info;
bool found = plugin_service_->GetFirstAllowedPluginInfo(url,
mime_type,
&info,
@@ -723,20 +723,18 @@ void RenderMessageFilter::OnGetPluginInfoOnFileThread(
found, info, actual_mime_type, policy_url, reply_msg));
}
-void RenderMessageFilter::OnGotPluginInfo(
- bool found,
- const webkit::npapi::WebPluginInfo& info,
- const std::string& actual_mime_type,
- const GURL& policy_url,
- IPC::Message* reply_msg) {
+void RenderMessageFilter::OnGotPluginInfo(bool found,
+ const WebPluginInfo& info,
+ const std::string& actual_mime_type,
+ const GURL& policy_url,
+ IPC::Message* reply_msg) {
ContentSetting setting = CONTENT_SETTING_DEFAULT;
- webkit::npapi::WebPluginInfo info_copy = info;
+ WebPluginInfo info_copy = info;
if (found) {
info_copy.enabled = info_copy.enabled &&
plugin_service_->PrivatePluginAllowedForURL(info_copy.path, policy_url);
std::string resource =
- webkit::npapi::PluginList::Singleton()->GetPluginGroupIdentifier(
- info_copy);
+ NPAPI::PluginList::Singleton()->GetPluginGroupIdentifier(info_copy);
setting = content_settings_->GetContentSetting(
policy_url,
CONTENT_SETTINGS_TYPE_PLUGINS,
diff --git a/chrome/browser/renderer_host/render_message_filter.h b/chrome/browser/renderer_host/render_message_filter.h
index 5c988b8..9a8a745 100644
--- a/chrome/browser/renderer_host/render_message_filter.h
+++ b/chrome/browser/renderer_host/render_message_filter.h
@@ -41,12 +41,7 @@ class RenderWidgetHelper;
class URLRequestContextGetter;
struct ViewHostMsg_CreateWindow_Params;
struct ViewHostMsg_CreateWorker_Params;
-
-namespace webkit {
-namespace npapi {
struct WebPluginInfo;
-}
-}
namespace base {
class SharedMemory;
@@ -158,7 +153,7 @@ class RenderMessageFilter : public BrowserMessageFilter,
const std::string& mime_type,
IPC::Message* reply_msg);
void OnGotPluginInfo(bool found,
- const webkit::npapi::WebPluginInfo& info,
+ const WebPluginInfo& info,
const std::string& actual_mime_type,
const GURL& policy_url,
IPC::Message* reply_msg);
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index b4bb0e2..3c71440b 100644
--- a/chrome/browser/renderer_host/render_widget_host.cc
+++ b/chrome/browser/renderer_host/render_widget_host.cc
@@ -22,8 +22,8 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webcursor.h"
-#include "webkit/plugins/npapi/webplugin.h"
#if defined(TOOLKIT_VIEWS)
#include "views/view.h"
diff --git a/chrome/browser/renderer_host/render_widget_host_view.h b/chrome/browser/renderer_host/render_widget_host_view.h
index 2d4b1ea..fdbe440 100644
--- a/chrome/browser/renderer_host/render_widget_host_view.h
+++ b/chrome/browser/renderer_host/render_widget_host_view.h
@@ -39,13 +39,8 @@ struct ViewHostMsg_AccessibilityNotification_Params;
namespace webkit_glue {
struct WebAccessibility;
-}
-
-namespace webkit {
-namespace npapi {
struct WebPluginGeometry;
}
-}
// RenderWidgetHostView is an interface implemented by an object that acts as
// the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its
@@ -102,7 +97,7 @@ class RenderWidgetHostView {
// Moves all plugin windows as described in the given list.
virtual void MovePluginWindows(
- const std::vector<webkit::npapi::WebPluginGeometry>& moves) = 0;
+ const std::vector<webkit_glue::WebPluginGeometry>& moves) = 0;
// Actually set/take focus to/from the associated View component.
virtual void Focus() = 0;
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index b091890ef..e90e096 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -38,9 +38,9 @@
#include "chrome/common/native_web_keyboard_event.h"
#include "gfx/gtk_preserve_window.h"
#include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webcursor_gtk_data.h"
-#include "webkit/plugins/npapi/webplugin.h"
#if defined(OS_CHROMEOS)
#include "views/widget/tooltip_window_gtk.h"
@@ -587,7 +587,7 @@ gfx::NativeView RenderWidgetHostViewGtk::GetNativeView() {
}
void RenderWidgetHostViewGtk::MovePluginWindows(
- const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
+ const std::vector<webkit_glue::WebPluginGeometry>& moves) {
for (size_t i = 0; i < moves.size(); ++i) {
plugin_container_manager_.MovePluginContainer(moves[i]);
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.h b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
index 2c47c01..9f9b2e2 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
@@ -19,8 +19,8 @@
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "gfx/native_widget_types.h"
#include "gfx/rect.h"
+#include "webkit/glue/plugins/gtk_plugin_container_manager.h"
#include "webkit/glue/webcursor.h"
-#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
class RenderWidgetHost;
class GtkIMContextWrapper;
@@ -61,7 +61,7 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView,
virtual void SetSize(const gfx::Size& size);
virtual gfx::NativeView GetNativeView();
virtual void MovePluginWindows(
- const std::vector<webkit::npapi::WebPluginGeometry>& moves);
+ const std::vector<webkit_glue::WebPluginGeometry>& moves);
virtual void Focus();
virtual void Blur();
virtual bool HasFocus();
@@ -208,7 +208,7 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView,
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/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h
index d538758..46efeee 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -184,7 +184,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
virtual void SetSize(const gfx::Size& size);
virtual gfx::NativeView GetNativeView();
virtual void MovePluginWindows(
- const std::vector<webkit::npapi::WebPluginGeometry>& moves);
+ const std::vector<webkit_glue::WebPluginGeometry>& moves);
virtual void Focus();
virtual void Blur();
virtual bool HasFocus();
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index 60cc85e..22175dc 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -40,8 +40,8 @@
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/WebKit/WebKit/chromium/public/mac/WebInputEventFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webaccessibility.h"
-#include "webkit/plugins/npapi/webplugin.h"
#import "third_party/mozilla/ComplexTextInputPanel.h"
using WebKit::WebInputEvent;
@@ -623,15 +623,15 @@ gfx::NativeView RenderWidgetHostViewMac::GetNativeView() {
}
void RenderWidgetHostViewMac::MovePluginWindows(
- const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
+ const std::vector<webkit_glue::WebPluginGeometry>& moves) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Handle movement of accelerated plugins, which are the only "windowed"
// plugins that exist on the Mac.
- for (std::vector<webkit::npapi::WebPluginGeometry>::const_iterator iter =
+ for (std::vector<webkit_glue::WebPluginGeometry>::const_iterator iter =
moves.begin();
iter != moves.end();
++iter) {
- webkit::npapi::WebPluginGeometry geom = *iter;
+ webkit_glue::WebPluginGeometry geom = *iter;
AcceleratedPluginView* view = ViewForPluginWindowHandle(geom.window);
DCHECK(view);
@@ -978,14 +978,14 @@ void RenderWidgetHostViewMac::AcceleratedSurfaceSetIOSurface(
// Fake up a WebPluginGeometry for the root window to set the
// container's size; we will never get a notification from the
// browser about the root window, only plugins.
- webkit::npapi::WebPluginGeometry geom;
+ webkit_glue::WebPluginGeometry geom;
gfx::Rect rect(0, 0, width, height);
geom.window = window;
geom.window_rect = rect;
geom.clip_rect = rect;
geom.visible = true;
geom.rects_valid = true;
- MovePluginWindows(std::vector<webkit::npapi::WebPluginGeometry>(1, geom));
+ MovePluginWindows(std::vector<webkit_glue::WebPluginGeometry>(1, geom));
}
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index a36c88f..521e48d 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -57,7 +57,7 @@ class RenderWidgetHostViewMacTest : public RenderViewHostTestHarness {
// The accelerated view isn't shown until it has a valid rect and has been
// painted to.
rwhv_mac_->AcceleratedSurfaceBuffersSwapped(accelerated_handle, 0, 0, 0, 0);
- webkit::npapi::WebPluginGeometry geom;
+ webkit_glue::WebPluginGeometry geom;
gfx::Rect rect(0, 0, w, h);
geom.window = accelerated_handle;
geom.window_rect = rect;
@@ -65,7 +65,7 @@ class RenderWidgetHostViewMacTest : public RenderViewHostTestHarness {
geom.visible = true;
geom.rects_valid = true;
rwhv_mac_->MovePluginWindows(
- std::vector<webkit::npapi::WebPluginGeometry>(1, geom));
+ std::vector<webkit_glue::WebPluginGeometry>(1, geom));
return accelerated_handle;
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc
index c48a1a9..cb17689 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -193,7 +193,7 @@ void RenderWidgetHostViewViews::SetSize(const gfx::Size& size) {
}
void RenderWidgetHostViewViews::MovePluginWindows(
- const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
+ const std::vector<webkit_glue::WebPluginGeometry>& moves) {
// TODO(anicolao): NIY
// NOTIMPLEMENTED();
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.h b/chrome/browser/renderer_host/render_widget_host_view_views.h
index 8a582a7..9c5c8cb 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.h
@@ -44,7 +44,7 @@ class RenderWidgetHostViewViews : public RenderWidgetHostView,
virtual void WasHidden();
virtual void SetSize(const gfx::Size& size);
virtual void MovePluginWindows(
- const std::vector<webkit::npapi::WebPluginGeometry>& moves);
+ const std::vector<webkit_glue::WebPluginGeometry>& moves);
virtual void Focus();
virtual void Blur();
virtual bool HasFocus();
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc
index 6a86bc0..f5afe70 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc
@@ -46,11 +46,11 @@
#include "views/focus/focus_util_win.h"
// Included for views::kReflectedMessage - TODO(beng): move this to win_util.h!
#include "views/widget/widget_win.h"
+#include "webkit/glue/plugins/plugin_constants_win.h"
+#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webcursor.h"
-#include "webkit/plugins/npapi/plugin_constants_win.h"
-#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
-#include "webkit/plugins/npapi/webplugin.h"
using app::ViewProp;
using base::TimeDelta;
@@ -59,7 +59,7 @@ using WebKit::WebInputEvent;
using WebKit::WebInputEventFactory;
using WebKit::WebMouseEvent;
using WebKit::WebTextDirection;
-using webkit::npapi::WebPluginGeometry;
+using webkit_glue::WebPluginGeometry;
const wchar_t kRenderWidgetHostHWNDClass[] = L"Chrome_RenderWidgetHostHWND";
@@ -236,7 +236,7 @@ class NotifyPluginProcessHostTask : public Task {
// Windows callback for OnDestroy to detach the plugin windows.
BOOL CALLBACK DetachPluginWindowsCallback(HWND window, LPARAM param) {
- if (webkit::npapi::WebPluginDelegateImpl::IsPluginDelegateWindow(window) &&
+ if (WebPluginDelegateImpl::IsPluginDelegateWindow(window) &&
!IsHungAppWindow(window)) {
::ShowWindow(window, SW_HIDE);
SetParent(window, NULL);
@@ -490,7 +490,7 @@ HWND RenderWidgetHostViewWin::ReparentWindow(HWND window) {
wcex.hCursor = 0;
wcex.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_WINDOW+1);
wcex.lpszMenuName = 0;
- wcex.lpszClassName = webkit::npapi::kWrapperNativeWindowClassName;
+ wcex.lpszClassName = kWrapperNativeWindowClassName;
wcex.hIconSm = 0;
window_class = RegisterClassEx(&wcex);
}
@@ -654,11 +654,11 @@ void RenderWidgetHostViewWin::ImeCancelComposition() {
}
BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lparam) {
- if (!webkit::npapi::WebPluginDelegateImpl::IsPluginDelegateWindow(hwnd))
+ if (!WebPluginDelegateImpl::IsPluginDelegateWindow(hwnd))
return TRUE;
gfx::Rect* rect = reinterpret_cast<gfx::Rect*>(lparam);
- static UINT msg = RegisterWindowMessage(webkit::npapi::kPaintMessageName);
+ static UINT msg = RegisterWindowMessage(kPaintMessageName);
WPARAM wparam = rect->x() << 16 | rect->y();
lparam = rect->width() << 16 | rect->height();
@@ -1447,8 +1447,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 (win_util::GetClassName(child_window) ==
- webkit::npapi::kWrapperNativeWindowClassName)
+ if (win_util::GetClassName(child_window) == kWrapperNativeWindowClassName)
child_window = ::GetWindow(child_window, GW_CHILD);
::SetFocus(child_window);
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.h b/chrome/browser/renderer_host/render_widget_host_view_win.h
index 50e59a6..1f67814 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.h
@@ -132,7 +132,7 @@ class RenderWidgetHostViewWin
virtual void SetSize(const gfx::Size& size);
virtual gfx::NativeView GetNativeView();
virtual void MovePluginWindows(
- const std::vector<webkit::npapi::WebPluginGeometry>& moves);
+ const std::vector<webkit_glue::WebPluginGeometry>& moves);
virtual void Focus();
virtual void Blur();
virtual bool HasFocus();
diff --git a/chrome/browser/renderer_host/test/test_render_view_host.h b/chrome/browser/renderer_host/test/test_render_view_host.h
index f84bc21..7aa9638 100644
--- a/chrome/browser/renderer_host/test/test_render_view_host.h
+++ b/chrome/browser/renderer_host/test/test_render_view_host.h
@@ -60,7 +60,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostView {
virtual void SetSize(const gfx::Size& size) {}
virtual gfx::NativeView GetNativeView() { return NULL; }
virtual void MovePluginWindows(
- const std::vector<webkit::npapi::WebPluginGeometry>& moves) {}
+ const std::vector<webkit_glue::WebPluginGeometry>& moves) {}
#if defined(OS_WIN)
virtual void ForwardMouseEventToRenderer(UINT message,
WPARAM wparam,
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 8f5ed48..46498e3 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -113,7 +113,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/password_form.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
// Cross-Site Navigations
//
@@ -2091,8 +2091,8 @@ void TabContents::OnCrashedPlugin(const FilePath& plugin_path) {
DCHECK(!plugin_path.value().empty());
std::wstring plugin_name = plugin_path.ToWStringHack();
- webkit::npapi::WebPluginInfo plugin_info;
- if (webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath(
+ WebPluginInfo plugin_info;
+ if (NPAPI::PluginList::Singleton()->GetPluginInfoByPath(
plugin_path, &plugin_info) &&
!plugin_info.name.empty()) {
plugin_name = UTF16ToWide(plugin_info.name);
diff --git a/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm b/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm
index 746d8a1..051d58b 100644
--- a/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm
@@ -15,8 +15,8 @@
#include "grit/generated_resources.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gtest_mac.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
+#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/glue/plugins/webplugininfo.h"
class TableModelArrayControllerTest : public CocoaTest {
public:
@@ -50,27 +50,27 @@ class TableModelArrayControllerTest : public CocoaTest {
model_.reset(new MockPluginExceptionsTableModel(map, NULL));
- std::vector<webkit::npapi::PluginGroup> plugins;
- webkit::npapi::WebPluginInfo foo_plugin;
+ std::vector<PluginGroup> plugins;
+ WebPluginInfo foo_plugin;
foo_plugin.path = FilePath(FILE_PATH_LITERAL("a-foo"));
foo_plugin.name = ASCIIToUTF16("FooPlugin");
foo_plugin.enabled = true;
- scoped_ptr<webkit::npapi::PluginGroup> foo_group(
- webkit::npapi::PluginGroup::FromWebPluginInfo(foo_plugin));
+ scoped_ptr<PluginGroup> foo_group(
+ PluginGroup::FromWebPluginInfo(foo_plugin));
plugins.push_back(*foo_group);
- webkit::npapi::WebPluginInfo bar_plugin;
+ WebPluginInfo bar_plugin;
bar_plugin.path = FilePath(FILE_PATH_LITERAL("b-bar"));
bar_plugin.name = ASCIIToUTF16("BarPlugin");
bar_plugin.enabled = true;
- scoped_ptr<webkit::npapi::PluginGroup> bar_group(
- webkit::npapi::PluginGroup::FromWebPluginInfo(bar_plugin));
+ scoped_ptr<PluginGroup> bar_group(
+ PluginGroup::FromWebPluginInfo(bar_plugin));
plugins.push_back(*bar_group);
- webkit::npapi::WebPluginInfo blurp_plugin;
+ WebPluginInfo blurp_plugin;
blurp_plugin.path = FilePath(FILE_PATH_LITERAL("c-blurp"));
blurp_plugin.name = ASCIIToUTF16("BlurpPlugin");
blurp_plugin.enabled = true;
- scoped_ptr<webkit::npapi::PluginGroup> blurp_group(
- webkit::npapi::PluginGroup::FromWebPluginInfo(blurp_plugin));
+ scoped_ptr<PluginGroup> blurp_group(
+ PluginGroup::FromWebPluginInfo(blurp_plugin));
plugins.push_back(*blurp_group);
model_->set_plugins(plugins);
diff --git a/chrome/common/chrome_plugin_lib.cc b/chrome/common/chrome_plugin_lib.cc
index 1bd118b..3277f4a 100644
--- a/chrome/common/chrome_plugin_lib.cc
+++ b/chrome/common/chrome_plugin_lib.cc
@@ -19,7 +19,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/chrome_paths.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
using base::TimeDelta;
@@ -114,7 +114,7 @@ void ChromePluginLib::RegisterPluginsWithNPAPI() {
FilePath path;
// Register Gears, if available.
if (PathService::Get(chrome::FILE_GEARS_PLUGIN, &path))
- webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
+ NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
}
static void LogPluginLoadTime(const TimeDelta &time) {
diff --git a/chrome/common/default_plugin.cc b/chrome/common/default_plugin.cc
index 3337c7c..bba738b 100644
--- a/chrome/common/default_plugin.cc
+++ b/chrome/common/default_plugin.cc
@@ -5,13 +5,13 @@
#include "chrome/common/default_plugin.h"
#include "chrome/default_plugin/plugin_main.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
namespace chrome {
void RegisterInternalDefaultPlugin() {
- const webkit::npapi::PluginVersionInfo default_plugin = {
- FilePath(webkit::npapi::kDefaultPluginLibraryName),
+ const NPAPI::PluginVersionInfo default_plugin = {
+ FilePath(kDefaultPluginLibraryName),
L"Default Plug-in",
L"Provides functionality for installing third-party plug-ins",
L"1",
@@ -27,8 +27,7 @@ void RegisterInternalDefaultPlugin() {
}
};
- webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(
- default_plugin);
+ NPAPI::PluginList::Singleton()->RegisterInternalPlugin(default_plugin);
}
} // namespace chrome
diff --git a/chrome/common/gpu_plugin.cc b/chrome/common/gpu_plugin.cc
index 4600638..84ab339 100644
--- a/chrome/common/gpu_plugin.cc
+++ b/chrome/common/gpu_plugin.cc
@@ -9,15 +9,18 @@
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_switches.h"
#include "gpu/gpu_plugin/gpu_plugin.h"
-#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/plugin_list.h"
+
+#if defined(ENABLE_GPU)
+#include "webkit/glue/plugins/plugin_constants_win.h"
+#endif
namespace chrome {
void RegisterInternalGPUPlugin() {
#if defined(ENABLE_GPU)
- static const std::wstring kWideMimeType = ASCIIToWide(
- "application/vnd.google.chrome.gpu-plugin");
- static const webkit::npapi::PluginVersionInfo kGPUPluginInfo = {
+ static const std::wstring kWideMimeType = ASCIIToWide(kGPUPluginMimeType);
+ static const NPAPI::PluginVersionInfo kGPUPluginInfo = {
FilePath(FILE_PATH_LITERAL("gpu-plugin")),
L"GPU Plug-in",
L"GPU Rendering Plug-in",
@@ -35,8 +38,7 @@ void RegisterInternalGPUPlugin() {
};
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableGPUPlugin))
- webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(
- kGPUPluginInfo);
+ NPAPI::PluginList::Singleton()->RegisterInternalPlugin(kGPUPluginInfo);
#endif // ENABLE_GPU
}
diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc
index c865a68..d0f8d4a 100644
--- a/chrome/common/render_messages.cc
+++ b/chrome/common/render_messages.cc
@@ -23,12 +23,12 @@
#include "webkit/blob/blob_data.h"
#include "webkit/glue/form_field.h"
#include "webkit/glue/password_form.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/resource_loader_bridge.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webcookie.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webmenuitem.h"
-#include "webkit/plugins/npapi/webplugin.h"
#if defined(OS_MACOSX)
#include "chrome/common/font_descriptor_mac.h"
@@ -196,8 +196,8 @@ void ParamTraits<ContextMenuParams>::Log(const param_type& p,
l->append("<ContextMenuParams>");
}
-void ParamTraits<webkit::npapi::WebPluginGeometry>::Write(Message* m,
- const param_type& p) {
+void ParamTraits<webkit_glue::WebPluginGeometry>::Write(Message* m,
+ const param_type& p) {
WriteParam(m, p.window);
WriteParam(m, p.window_rect);
WriteParam(m, p.clip_rect);
@@ -206,7 +206,7 @@ void ParamTraits<webkit::npapi::WebPluginGeometry>::Write(Message* m,
WriteParam(m, p.visible);
}
-bool ParamTraits<webkit::npapi::WebPluginGeometry>::Read(
+bool ParamTraits<webkit_glue::WebPluginGeometry>::Read(
const Message* m, void** iter, param_type* p) {
return
ReadParam(m, iter, &p->window) &&
@@ -217,8 +217,8 @@ bool ParamTraits<webkit::npapi::WebPluginGeometry>::Read(
ReadParam(m, iter, &p->visible);
}
-void ParamTraits<webkit::npapi::WebPluginGeometry>::Log(const param_type& p,
- std::string* l) {
+void ParamTraits<webkit_glue::WebPluginGeometry>::Log(const param_type& p,
+ std::string* l) {
l->append("(");
LogParam(p.window, l);
l->append(", ");
@@ -234,24 +234,21 @@ void ParamTraits<webkit::npapi::WebPluginGeometry>::Log(const param_type& p,
l->append(")");
}
-void ParamTraits<webkit::npapi::WebPluginMimeType>::Write(Message* m,
- const param_type& p) {
+void ParamTraits<WebPluginMimeType>::Write(Message* m, const param_type& p) {
WriteParam(m, p.mime_type);
WriteParam(m, p.file_extensions);
WriteParam(m, p.description);
}
-bool ParamTraits<webkit::npapi::WebPluginMimeType>::Read(const Message* m,
- void** iter,
- param_type* r) {
+bool ParamTraits<WebPluginMimeType>::Read(const Message* m, void** iter,
+ param_type* r) {
return
ReadParam(m, iter, &r->mime_type) &&
ReadParam(m, iter, &r->file_extensions) &&
ReadParam(m, iter, &r->description);
}
-void ParamTraits<webkit::npapi::WebPluginMimeType>::Log(const param_type& p,
- std::string* l) {
+void ParamTraits<WebPluginMimeType>::Log(const param_type& p, std::string* l) {
l->append("(");
LogParam(p.mime_type, l);
l->append(", ");
@@ -261,8 +258,7 @@ void ParamTraits<webkit::npapi::WebPluginMimeType>::Log(const param_type& p,
l->append(")");
}
-void ParamTraits<webkit::npapi::WebPluginInfo>::Write(Message* m,
- const param_type& p) {
+void ParamTraits<WebPluginInfo>::Write(Message* m, const param_type& p) {
WriteParam(m, p.name);
WriteParam(m, p.path);
WriteParam(m, p.version);
@@ -271,9 +267,8 @@ void ParamTraits<webkit::npapi::WebPluginInfo>::Write(Message* m,
WriteParam(m, p.enabled);
}
-bool ParamTraits<webkit::npapi::WebPluginInfo>::Read(const Message* m,
- void** iter,
- param_type* r) {
+bool ParamTraits<WebPluginInfo>::Read(const Message* m, void** iter,
+ param_type* r) {
return
ReadParam(m, iter, &r->name) &&
ReadParam(m, iter, &r->path) &&
@@ -283,8 +278,7 @@ bool ParamTraits<webkit::npapi::WebPluginInfo>::Read(const Message* m,
ReadParam(m, iter, &r->enabled);
}
-void ParamTraits<webkit::npapi::WebPluginInfo>::Log(const param_type& p,
- std::string* l) {
+void ParamTraits<WebPluginInfo>::Log(const param_type& p, std::string* l) {
l->append("(");
LogParam(p.name, l);
l->append(", ");
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 06e597c..6e4e6b9 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -61,15 +61,8 @@ struct ResourceLoadTimingInfo;
struct ResourceResponseInfo;
struct WebAccessibility;
struct WebCookie;
-struct WebAccessibility;
-}
-
-namespace webkit {
-namespace npapi {
struct WebPluginGeometry;
-struct WebPluginInfo;
-struct WebPluginMimeType;
-}
+struct WebAccessibility;
}
struct AudioBuffersState;
@@ -84,6 +77,8 @@ struct SyncLoadResult;
struct RendererPreferences;
struct WebDropData;
struct WebMenuItem;
+struct WebPluginInfo;
+struct WebPluginMimeType;
struct WebPreferences;
// Forward declarations of structures used to store data for when we have a lot
@@ -156,8 +151,8 @@ struct ParamTraits<ContextMenuParams> {
};
template <>
-struct ParamTraits<webkit::npapi::WebPluginGeometry> {
- typedef webkit::npapi::WebPluginGeometry param_type;
+struct ParamTraits<webkit_glue::WebPluginGeometry> {
+ typedef webkit_glue::WebPluginGeometry param_type;
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, void** iter, param_type* p);
static void Log(const param_type& p, std::string* l);
@@ -165,16 +160,16 @@ struct ParamTraits<webkit::npapi::WebPluginGeometry> {
// Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack.
template <>
-struct ParamTraits<webkit::npapi::WebPluginMimeType> {
- typedef webkit::npapi::WebPluginMimeType param_type;
+struct ParamTraits<WebPluginMimeType> {
+ typedef WebPluginMimeType param_type;
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, void** iter, param_type* r);
static void Log(const param_type& p, std::string* l);
};
template <>
-struct ParamTraits<webkit::npapi::WebPluginInfo> {
- typedef webkit::npapi::WebPluginInfo param_type;
+struct ParamTraits<WebPluginInfo> {
+ typedef WebPluginInfo param_type;
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, void** iter, param_type* r);
static void Log(const param_type& p, std::string* l);
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index 01fc555..947be93 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -30,8 +30,8 @@
#include "webkit/glue/context_menu.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/password_form_dom_manager.h"
+#include "webkit/glue/plugins/webplugininfo.h"
#include "webkit/glue/webdropdata.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
@@ -1362,8 +1362,8 @@ IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_CookiesEnabled,
// Used to get the list of plugins
IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
- bool /* refresh*/,
- std::vector<webkit::npapi::WebPluginInfo> /* plugins */)
+ bool /* refresh*/,
+ std::vector<WebPluginInfo> /* plugins */)
// Return information about a plugin for the given URL and MIME
// type. If there is no matching plugin, |found| is false. If
@@ -1391,7 +1391,7 @@ IPC_SYNC_MESSAGE_CONTROL3_4(ViewHostMsg_GetPluginInfo,
GURL /* policy_url */,
std::string /* mime_type */,
bool /* found */,
- webkit::npapi::WebPluginInfo /* plugin info */,
+ WebPluginInfo /* plugin info */,
ContentSetting /* setting */,
std::string /* actual_mime_type */)
@@ -1535,7 +1535,7 @@ IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_OpenChannelToPlugin,
GURL /* url */,
std::string /* mime_type */,
IPC::ChannelHandle /* channel_handle */,
- webkit::npapi::WebPluginInfo /* info */)
+ WebPluginInfo /* info */)
// A renderer sends this to the browser process when it wants to
// create a pepper plugin. The browser will create the plugin process if
diff --git a/chrome/common/render_messages_params.h b/chrome/common/render_messages_params.h
index 911e3ae..7b21a20 100644
--- a/chrome/common/render_messages_params.h
+++ b/chrome/common/render_messages_params.h
@@ -32,11 +32,11 @@
#include "media/audio/audio_parameters.h"
#include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h"
#include "webkit/glue/password_form.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/resource_type.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webmenuitem.h"
#include "webkit/glue/webpreferences.h"
-#include "webkit/plugins/npapi/webplugin.h"
// TODO(erg): Split this file into $1_db_params.h, $1_audio_params.h,
// $1_print_params.h and $1_render_params.h.
@@ -356,7 +356,7 @@ struct ViewHostMsg_UpdateRect_Params {
gfx::Rect resizer_rect;
// New window locations for plugin child windows.
- std::vector<webkit::npapi::WebPluginGeometry> plugin_window_moves;
+ std::vector<webkit_glue::WebPluginGeometry> plugin_window_moves;
// The following describes the various bits that may be set in flags:
//
diff --git a/chrome/default_plugin/DEPS b/chrome/default_plugin/DEPS
index 0ba7c46..6e518f99 100644
--- a/chrome/default_plugin/DEPS
+++ b/chrome/default_plugin/DEPS
@@ -3,5 +3,4 @@ include_rules = [
"+grit", # For generated headers
"+libxml",
"+webkit/glue",
- "+webkit/plugins",
]
diff --git a/chrome/default_plugin/plugin_impl_gtk.cc b/chrome/default_plugin/plugin_impl_gtk.cc
index b6dc38a..ae7dfb2 100644
--- a/chrome/default_plugin/plugin_impl_gtk.cc
+++ b/chrome/default_plugin/plugin_impl_gtk.cc
@@ -14,7 +14,7 @@
#include "grit/webkit_strings.h"
#include "unicode/locid.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/plugins/npapi/default_plugin_shared.h"
+#include "webkit/glue/plugins/default_plugin_shared.h"
// TODO(thakis): Most methods in this class are stubbed out an need to be
// implemented.
@@ -137,6 +137,6 @@ void PluginInstallerImpl::NotifyPluginStatus(int status) {
default_plugin::g_browser->getvalue(
instance_,
static_cast<NPNVariable>(
- webkit::npapi::default_plugin::kMissingPluginStatusStart + status),
+ default_plugin::kMissingPluginStatusStart + status),
NULL);
}
diff --git a/chrome/default_plugin/plugin_impl_mac.mm b/chrome/default_plugin/plugin_impl_mac.mm
index f964023..0bad41b 100644
--- a/chrome/default_plugin/plugin_impl_mac.mm
+++ b/chrome/default_plugin/plugin_impl_mac.mm
@@ -17,7 +17,7 @@
#include "grit/webkit_strings.h"
#include "unicode/locid.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/plugins/npapi/default_plugin_shared.h"
+#include "webkit/glue/plugins/default_plugin_shared.h"
// TODO(thakis): Most methods in this class are stubbed out and need to be
// implemented.
@@ -194,6 +194,6 @@ void PluginInstallerImpl::NotifyPluginStatus(int status) {
default_plugin::g_browser->getvalue(
instance_,
static_cast<NPNVariable>(
- webkit::npapi::default_plugin::kMissingPluginStatusStart + status),
+ default_plugin::kMissingPluginStatusStart + status),
NULL);
}
diff --git a/chrome/default_plugin/plugin_impl_win.cc b/chrome/default_plugin/plugin_impl_win.cc
index cb767b0..e9346c6 100644
--- a/chrome/default_plugin/plugin_impl_win.cc
+++ b/chrome/default_plugin/plugin_impl_win.cc
@@ -15,7 +15,7 @@
#include "grit/webkit_strings.h"
#include "unicode/locid.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/plugins/npapi/default_plugin_shared.h"
+#include "webkit/glue/plugins/default_plugin_shared.h"
static const int TOOLTIP_MAX_WIDTH = 500;
@@ -250,8 +250,7 @@ void PluginInstallerImpl::URLNotify(const char* url, NPReason reason) {
if (plugin_available) {
DVLOG(1) << "Plugin available for mime type " << mime_type_;
DisplayAvailablePluginStatus();
- NotifyPluginStatus(
- webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE);
+ NotifyPluginStatus(default_plugin::MISSING_PLUGIN_AVAILABLE);
} else {
DLOG(WARNING) << "No plugin available for mime type " << mime_type_;
DisplayStatus(IDS_DEFAULT_PLUGIN_NO_PLUGIN_AVAILABLE_MSG);
@@ -261,8 +260,7 @@ void PluginInstallerImpl::URLNotify(const char* url, NPReason reason) {
int16 PluginInstallerImpl::NPP_HandleEvent(void* event) {
NPEvent* npp_event = static_cast<NPEvent*>(event);
- if (npp_event->event ==
- webkit::npapi::default_plugin::kInstallMissingPluginMessage) {
+ if (npp_event->event == default_plugin::kInstallMissingPluginMessage) {
// We could get this message because InfoBar may not be in sync with our
// internal processing. So we need to check the status.
if (plugin_installer_state() == PluginListDownloaded) {
@@ -529,8 +527,7 @@ LRESULT PluginInstallerImpl::OnLButtonDown(UINT message, WPARAM wparam,
return 0;
if (plugin_installer_state() == PluginListDownloaded) {
ShowInstallDialog();
- NotifyPluginStatus(
- webkit::npapi::default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD);
+ NotifyPluginStatus(default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD);
} else if (plugin_installer_state_ == PluginInstallerLaunchSuccess) {
DCHECK(default_plugin::g_browser);
DCHECK(default_plugin::g_browser->geturl);
@@ -645,6 +642,6 @@ void PluginInstallerImpl::NotifyPluginStatus(int status) {
default_plugin::g_browser->getvalue(
instance_,
static_cast<NPNVariable>(
- webkit::npapi::default_plugin::kMissingPluginStatusStart + status),
+ default_plugin::kMissingPluginStatusStart + status),
NULL);
}
diff --git a/chrome/plugin/DEPS b/chrome/plugin/DEPS
index 15434bf..3517180 100644
--- a/chrome/plugin/DEPS
+++ b/chrome/plugin/DEPS
@@ -5,7 +5,7 @@ include_rules = [
"+skia/ext",
"+third_party/npapi",
"+webkit/glue",
- "+webkit/plugins",
+ "+webkit/glue/plugins",
"+grit", # For generated headers
]
diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc
index 8458e25..22b3da9 100644
--- a/chrome/plugin/chrome_plugin_host.cc
+++ b/chrome/plugin/chrome_plugin_host.cc
@@ -25,7 +25,7 @@
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
#include "webkit/appcache/appcache_interfaces.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/glue/plugins/plugin_instance.h"
#include "webkit/glue/resource_loader_bridge.h"
#include "webkit/glue/resource_type.h"
#include "webkit/glue/webkit_glue.h"
@@ -415,8 +415,8 @@ CPBrowsingContext STDCALL CPB_GetBrowsingContextFromNPP(NPP npp) {
if (!npp)
return CPERR_INVALID_PARAMETER;
- webkit::npapi::PluginInstance* instance =
- static_cast<webkit::npapi::PluginInstance *>(npp->ndata);
+ NPAPI::PluginInstance* instance =
+ static_cast<NPAPI::PluginInstance *>(npp->ndata);
WebPluginProxy* webplugin =
static_cast<WebPluginProxy*>(instance->webplugin());
diff --git a/chrome/plugin/npobject_proxy.cc b/chrome/plugin/npobject_proxy.cc
index 0b7ff45..f245151 100644
--- a/chrome/plugin/npobject_proxy.cc
+++ b/chrome/plugin/npobject_proxy.cc
@@ -9,7 +9,7 @@
#include "chrome/plugin/plugin_channel.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/glue/plugins/plugin_instance.h"
using WebKit::WebBindings;
@@ -460,8 +460,8 @@ bool NPObjectProxy::NPNEvaluate(NPP npp,
bool popups_allowed = false;
if (npp) {
- webkit::npapi::PluginInstance* plugin_instance =
- reinterpret_cast<webkit::npapi::PluginInstance*>(npp->ndata);
+ NPAPI::PluginInstance* plugin_instance =
+ reinterpret_cast<NPAPI::PluginInstance*>(npp->ndata);
if (plugin_instance)
popups_allowed = plugin_instance->popups_allowed();
}
diff --git a/chrome/plugin/npobject_stub.cc b/chrome/plugin/npobject_stub.cc
index e0a8436..c711756 100644
--- a/chrome/plugin/npobject_stub.cc
+++ b/chrome/plugin/npobject_stub.cc
@@ -12,7 +12,7 @@
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/npruntime.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
-#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/glue/plugins/plugin_constants_win.h"
using WebKit::WebBindings;
@@ -243,7 +243,7 @@ void NPObjectStub::OnSetProperty(const NPIdentifier_Param& name,
PluginThread::current()->plugin_path().BaseName().value());
static NPIdentifier fullscreen =
WebBindings::getStringIdentifier("fullScreen");
- if (filename == webkit::npapi::kNewWMPPlugin && id == fullscreen) {
+ if (filename == kNewWMPPlugin && id == fullscreen) {
// Workaround for bug 15985, which is if Flash causes WMP to go
// full screen a deadlock can occur when WMP calls SetFocus.
NPObjectMsg_SetProperty::WriteReplyParams(reply_msg, true);
diff --git a/chrome/plugin/npobject_util.cc b/chrome/plugin/npobject_util.cc
index 60324cf..0c54a33 100644
--- a/chrome/plugin/npobject_util.cc
+++ b/chrome/plugin/npobject_util.cc
@@ -10,7 +10,7 @@
#include "chrome/plugin/plugin_channel_base.h"
#include "third_party/npapi/bindings/nphostapi.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
-#include "webkit/plugins/npapi/plugin_host.h"
+#include "webkit/glue/plugins/plugin_host.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebBindings;
@@ -129,7 +129,7 @@ NPNetscapeFuncs *GetHostFunctions() {
void PatchNPNFunctions() {
g_plugin_process = true;
NPNetscapeFuncs* funcs = GetHostFunctions();
- webkit::npapi::PluginHost::Singleton()->PatchNPNetscapeFuncs(funcs);
+ NPAPI::PluginHost::Singleton()->PatchNPNetscapeFuncs(funcs);
}
bool IsPluginProcess() {
diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc
index bc5e61e..b3b12951 100644
--- a/chrome/plugin/plugin_channel.cc
+++ b/chrome/plugin/plugin_channel.cc
@@ -16,7 +16,7 @@
#include "chrome/plugin/plugin_thread.h"
#include "chrome/plugin/webplugin_delegate_stub.h"
#include "chrome/plugin/webplugin_proxy.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/glue/plugins/plugin_instance.h"
#if defined(OS_POSIX)
#include "base/eintr_wrapper.h"
@@ -256,12 +256,12 @@ void PluginChannel::OnClearSiteData(uint64 flags,
bool success = false;
CommandLine* command_line = CommandLine::ForCurrentProcess();
FilePath path = command_line->GetSwitchValuePath(switches::kPluginPath);
- scoped_refptr<webkit::npapi::PluginLib> plugin_lib(
- webkit::npapi::PluginLib::CreatePluginLib(path));
+ scoped_refptr<NPAPI::PluginLib> plugin_lib(
+ NPAPI::PluginLib::CreatePluginLib(path));
if (plugin_lib.get()) {
NPError err = plugin_lib->NP_Initialize();
if (err == NPERR_NO_ERROR) {
- scoped_refptr<webkit::npapi::PluginInstance> instance(
+ scoped_refptr<NPAPI::PluginInstance> instance(
plugin_lib->CreateInstance(std::string()));
const char* domain_str = domain.empty() ? NULL : domain.c_str();
diff --git a/chrome/plugin/plugin_interpose_util_mac.mm b/chrome/plugin/plugin_interpose_util_mac.mm
index 7299d4b..45df449 100644
--- a/chrome/plugin/plugin_interpose_util_mac.mm
+++ b/chrome/plugin/plugin_interpose_util_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2008 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.
@@ -9,7 +9,7 @@
#include "chrome/common/plugin_messages.h"
#include "chrome/plugin/plugin_thread.h"
-#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
+#include "webkit/glue/plugins/webplugin_delegate_impl.h"
namespace mac_plugin_interposing {
@@ -32,7 +32,7 @@ void SwitchToPluginProcess() {
__attribute__((visibility("default")))
OpaquePluginRef GetActiveDelegate() {
- return webkit::npapi::WebPluginDelegateImpl::GetActiveDelegate();
+ return WebPluginDelegateImpl::GetActiveDelegate();
}
__attribute__((visibility("default")))
@@ -72,15 +72,13 @@ void NotifyBrowserOfPluginHideWindow(uint32 window_id, CGRect bounds) {
__attribute__((visibility("default")))
void NotifyPluginOfSetThemeCursor(OpaquePluginRef delegate,
ThemeCursor cursor) {
- static_cast<webkit::npapi::WebPluginDelegateImpl*>(delegate)->SetThemeCursor(
- cursor);
+ static_cast<WebPluginDelegateImpl*>(delegate)->SetThemeCursor(cursor);
}
__attribute__((visibility("default")))
void NotifyPluginOfSetCursor(OpaquePluginRef delegate,
const Cursor* cursor) {
- static_cast<webkit::npapi::WebPluginDelegateImpl*>(delegate)->SetCursor(
- cursor);
+ static_cast<WebPluginDelegateImpl*>(delegate)->SetCursor(cursor);
}
void NotifyPluginOfSetCursorVisibility(bool visibility) {
@@ -93,8 +91,7 @@ void NotifyPluginOfSetCursorVisibility(bool visibility) {
__attribute__((visibility("default")))
bool GetPluginWindowHasFocus(const OpaquePluginRef delegate) {
- return static_cast<webkit::npapi::WebPluginDelegateImpl*>(
- delegate)->GetWindowHasFocus();
+ return static_cast<WebPluginDelegateImpl*>(delegate)->GetWindowHasFocus();
}
} // namespace mac_plugin_interposing
@@ -240,8 +237,7 @@ static void OnPluginWindowShown(const WindowInfo& window_info, BOOL is_modal) {
- (void)chromePlugin_set {
OpaquePluginRef delegate = mac_plugin_interposing::GetActiveDelegate();
if (delegate) {
- static_cast<webkit::npapi::WebPluginDelegateImpl*>(delegate)->SetNSCursor(
- self);
+ static_cast<WebPluginDelegateImpl*>(delegate)->SetNSCursor(self);
return;
}
[self chromePlugin_set];
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index 8edcbbd..7e2b921 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -29,9 +29,9 @@
#include "chrome/renderer/render_thread.h"
#include "ipc/ipc_channel_handle.h"
#include "net/base/net_errors.h"
+#include "webkit/glue/plugins/plugin_lib.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/plugins/npapi/plugin_lib.h"
-#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
+#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#if defined(TOOLKIT_USES_GTK)
#include "gfx/gtk_util.h"
@@ -86,8 +86,8 @@ PluginThread::PluginThread()
ChromePluginLib::Create(plugin_path_, GetCPBrowserFuncsForPlugin());
- scoped_refptr<webkit::npapi::PluginLib> plugin(
- webkit::npapi::PluginLib::CreatePluginLib(plugin_path_));
+ scoped_refptr<NPAPI::PluginLib> plugin(
+ NPAPI::PluginLib::CreatePluginLib(plugin_path_));
if (plugin.get()) {
plugin->NP_Initialize();
@@ -115,7 +115,7 @@ PluginThread::~PluginThread() {
preloaded_plugin_module_ = NULL;
}
PluginChannelBase::CleanupChannels();
- webkit::npapi::PluginLib::UnloadAllPlugins();
+ NPAPI::PluginLib::UnloadAllPlugins();
ChromePluginLib::UnloadAllPlugins();
if (webkit_glue::ShouldForcefullyTerminatePluginProcess())
diff --git a/chrome/plugin/plugin_thread.h b/chrome/plugin/plugin_thread.h
index 4d24e3c..99d07ed 100644
--- a/chrome/plugin/plugin_thread.h
+++ b/chrome/plugin/plugin_thread.h
@@ -11,7 +11,7 @@
#include "build/build_config.h"
#include "chrome/common/child_thread.h"
#include "chrome/plugin/plugin_channel.h"
-#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/glue/plugins/plugin_lib.h"
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
diff --git a/chrome/plugin/webplugin_accelerated_surface_proxy_mac.h b/chrome/plugin/webplugin_accelerated_surface_proxy_mac.h
index ee4df63..8764ab9 100644
--- a/chrome/plugin/webplugin_accelerated_surface_proxy_mac.h
+++ b/chrome/plugin/webplugin_accelerated_surface_proxy_mac.h
@@ -6,7 +6,7 @@
#define CHROME_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_
#pragma once
-#include "webkit/plugins/npapi/webplugin_accelerated_surface_mac.h"
+#include "webkit/glue/plugins/webplugin_accelerated_surface_mac.h"
class WebPluginProxy;
class AcceleratedSurface;
@@ -14,7 +14,7 @@ class AcceleratedSurface;
// Out-of-process implementation of WebPluginAcceleratedSurface that proxies
// calls through a WebPluginProxy.
class WebPluginAcceleratedSurfaceProxy
- : public webkit::npapi::WebPluginAcceleratedSurface {
+ : public webkit_glue::WebPluginAcceleratedSurface {
public:
// Creates a new WebPluginAcceleratedSurfaceProxy that uses plugin_proxy
// to proxy calls. plugin_proxy must outlive this object.
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index 0540adf..ff0652d 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -20,7 +20,7 @@
#include "skia/ext/platform_device.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
-#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
+#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#include "webkit/glue/webcursor.h"
#if defined(ENABLE_GPU)
@@ -29,15 +29,13 @@
using WebKit::WebBindings;
using WebKit::WebCursorInfo;
-using webkit::npapi::WebPlugin;
-using webkit::npapi::WebPluginResourceClient;
+using webkit_glue::WebPlugin;
+using webkit_glue::WebPluginResourceClient;
class FinishDestructionTask : public Task {
public:
- FinishDestructionTask(webkit::npapi::WebPluginDelegateImpl* delegate,
- WebPlugin* webplugin)
- : delegate_(delegate), webplugin_(webplugin) {
- }
+ FinishDestructionTask(WebPluginDelegateImpl* delegate, WebPlugin* webplugin)
+ : delegate_(delegate), webplugin_(webplugin) { }
void Run() {
// WebPlugin must outlive WebPluginDelegate.
@@ -48,8 +46,8 @@ class FinishDestructionTask : public Task {
}
private:
- webkit::npapi::WebPluginDelegateImpl* delegate_;
- webkit::npapi::WebPlugin* webplugin_;
+ WebPluginDelegateImpl* delegate_;
+ WebPlugin* webplugin_;
};
WebPluginDelegateStub::WebPluginDelegateStub(
@@ -187,8 +185,7 @@ void WebPluginDelegateStub::OnInit(const PluginMsg_Init_Params& params,
webplugin_ = new WebPluginProxy(
channel_, instance_id_, page_url_, params.containing_window,
params.host_render_view_routing_id);
- delegate_ = webkit::npapi::WebPluginDelegateImpl::Create(
- path, mime_type_, parent);
+ delegate_ = WebPluginDelegateImpl::Create(path, mime_type_, parent);
if (delegate_) {
webplugin_->set_delegate(delegate_);
*result = delegate_->Initialize(params.url,
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index c310467..cbd2c97 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -29,11 +29,7 @@ namespace WebKit {
class WebInputEvent;
}
-namespace webkit {
-namespace npapi {
class WebPluginDelegateImpl;
-}
-}
// Converts the IPC messages from WebPluginDelegateProxy into calls to the
// actual WebPluginDelegateImpl object.
@@ -115,7 +111,7 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
scoped_refptr<PluginChannel> channel_;
- webkit::npapi::WebPluginDelegateImpl* delegate_;
+ WebPluginDelegateImpl* delegate_;
WebPluginProxy* webplugin_;
bool in_destructor_;
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
index 498df98..bb77108 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -34,17 +34,16 @@
#endif
#include "skia/ext/platform_device.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
-#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
+#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#if defined(USE_X11)
#include "app/x11_util_internal.h"
#endif
using WebKit::WebBindings;
-
-using webkit::npapi::WebPluginResourceClient;
+using webkit_glue::WebPluginResourceClient;
#if defined(OS_MACOSX)
-using webkit::npapi::WebPluginAcceleratedSurface;
+using webkit_glue::WebPluginAcceleratedSurface;
#endif
typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap;
@@ -324,8 +323,7 @@ void WebPluginProxy::HandleURLRequest(const char* url,
// Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082
// for more details on this.
if (delegate_->GetQuirks() &
- webkit::npapi::WebPluginDelegateImpl::
- PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) {
+ WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) {
GURL request_url(url);
if (!request_url.SchemeIs(chrome::kHttpScheme) &&
!request_url.SchemeIs(chrome::kHttpsScheme) &&
diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h
index 2a1f1aee..66b396c 100644
--- a/chrome/plugin/webplugin_proxy.h
+++ b/chrome/plugin/webplugin_proxy.h
@@ -24,23 +24,17 @@
#include "chrome/common/chrome_plugin_api.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message.h"
-#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/glue/plugins/webplugin.h"
class PluginChannel;
-
-namespace webkit {
-namespace npapi {
class WebPluginDelegateImpl;
-}
-}
-
#if defined(OS_MACOSX)
class WebPluginAcceleratedSurfaceProxy;
#endif
// This is an implementation of WebPlugin that proxies all calls to the
// renderer.
-class WebPluginProxy : public webkit::npapi::WebPlugin {
+class WebPluginProxy : public webkit_glue::WebPlugin {
public:
// Creates a new proxy for WebPlugin, using the given sender to send the
// marshalled WebPlugin calls.
@@ -51,7 +45,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
int host_render_view_routing_id);
~WebPluginProxy();
- void set_delegate(webkit::npapi::WebPluginDelegateImpl* d) { delegate_ = d; }
+ void set_delegate(WebPluginDelegateImpl* d) { delegate_ = d; }
// WebPlugin overrides
virtual void SetWindow(gfx::PluginWindowHandle window);
@@ -99,7 +93,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
// Returns a WebPluginResourceClient object given its id, or NULL if no
// object with that id exists.
- webkit::npapi::WebPluginResourceClient* GetResourceClient(int id);
+ webkit_glue::WebPluginResourceClient* GetResourceClient(int id);
// Returns the id of the renderer that contains this plugin.
int GetRendererId();
@@ -117,7 +111,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
// Notification received on a plugin issued resource request creation.
void OnResourceCreated(int resource_id,
- webkit::npapi::WebPluginResourceClient* client);
+ webkit_glue::WebPluginResourceClient* client);
virtual void HandleURLRequest(const char* url,
const char* method,
@@ -143,7 +137,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
virtual void SetDeferResourceLoading(unsigned long resource_id, bool defer);
virtual bool IsOffTheRecord();
virtual void ResourceClientDeleted(
- webkit::npapi::WebPluginResourceClient* resource_client);
+ webkit_glue::WebPluginResourceClient* resource_client);
gfx::NativeViewId containing_window() { return containing_window_; }
#if defined(OS_MACOSX)
@@ -151,7 +145,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
virtual void BindFakePluginWindowHandle(bool opaque);
- virtual webkit::npapi::WebPluginAcceleratedSurface* GetAcceleratedSurface();
+ virtual webkit_glue::WebPluginAcceleratedSurface* GetAcceleratedSurface();
// Tell the browser (via the renderer) to invalidate because the
// accelerated buffers have changed.
@@ -195,7 +189,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
const TransportDIB::Handle& background_buffer,
const gfx::Rect& window_rect);
- typedef base::hash_map<int, webkit::npapi::WebPluginResourceClient*>
+ typedef base::hash_map<int, webkit_glue::WebPluginResourceClient*>
ResourceClientMap;
ResourceClientMap resource_clients_;
@@ -204,7 +198,7 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
uint32 cp_browsing_context_;
NPObject* window_npobject_;
NPObject* plugin_element_;
- webkit::npapi::WebPluginDelegateImpl* delegate_;
+ WebPluginDelegateImpl* delegate_;
gfx::Rect damaged_rect_;
bool waiting_for_paint_;
gfx::NativeViewId containing_window_;
diff --git a/chrome/renderer/blocked_plugin.cc b/chrome/renderer/blocked_plugin.cc
index 68af8f8..e3d2a3a 100644
--- a/chrome/renderer/blocked_plugin.cc
+++ b/chrome/renderer/blocked_plugin.cc
@@ -22,9 +22,9 @@
#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
+#include "webkit/glue/plugins/plugin_group.h"
+#include "webkit/glue/plugins/webview_plugin.h"
#include "webkit/glue/webpreferences.h"
-#include "webkit/plugins/npapi/plugin_group.h"
-#include "webkit/plugins/npapi/webview_plugin.h"
using WebKit::WebContextMenuData;
using WebKit::WebFrame;
@@ -42,7 +42,7 @@ static const unsigned kMenuActionRemove = 2;
BlockedPlugin::BlockedPlugin(RenderView* render_view,
WebFrame* frame,
- const webkit::npapi::PluginGroup& info,
+ const PluginGroup& info,
const WebPluginParams& params,
const WebPreferences& preferences,
int template_id,
@@ -65,10 +65,10 @@ BlockedPlugin::BlockedPlugin(RenderView* render_view,
std::string html_data = jstemplate_builder::GetTemplatesHtml(
template_html, &values, "t");
- plugin_ = webkit::npapi::WebViewPlugin::Create(this,
- preferences,
- html_data,
- GURL(kBlockedPluginDataURL));
+ plugin_ = WebViewPlugin::Create(this,
+ preferences,
+ html_data,
+ GURL(kBlockedPluginDataURL));
registrar_.Add(this,
NotificationType::SHOULD_LOAD_PLUGINS,
diff --git a/chrome/renderer/blocked_plugin.h b/chrome/renderer/blocked_plugin.h
index 7b616bf..53859bc 100644
--- a/chrome/renderer/blocked_plugin.h
+++ b/chrome/renderer/blocked_plugin.h
@@ -11,32 +11,26 @@
#include "chrome/renderer/custom_menu_listener.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
#include "webkit/glue/cpp_bound_class.h"
-#include "webkit/plugins/npapi/webview_plugin.h"
+#include "webkit/glue/plugins/webview_plugin.h"
class GURL;
-class RenderView;
-
-
-namespace webkit {
-namespace npapi {
class PluginGroup;
-}
-}
+class RenderView;
class BlockedPlugin : public CppBoundClass,
- public webkit::npapi::WebViewPlugin::Delegate,
+ public WebViewPlugin::Delegate,
public NotificationObserver,
public CustomMenuListener {
public:
BlockedPlugin(RenderView* render_view,
WebKit::WebFrame* frame,
- const webkit::npapi::PluginGroup& info,
+ const PluginGroup& info,
const WebKit::WebPluginParams& params,
const WebPreferences& settings,
int template_id,
const string16& message);
- webkit::npapi::WebViewPlugin* plugin() { return plugin_; }
+ WebViewPlugin* plugin() { return plugin_; }
// WebViewPlugin::Delegate methods:
virtual void BindWebFrame(WebKit::WebFrame* frame);
@@ -68,7 +62,7 @@ class BlockedPlugin : public CppBoundClass,
RenderView* render_view_;
WebKit::WebFrame* frame_;
WebKit::WebPluginParams plugin_params_;
- webkit::npapi::WebViewPlugin* plugin_;
+ WebViewPlugin* plugin_;
// The name of the plugin that was blocked.
string16 name_;
diff --git a/chrome/renderer/pepper_devices.cc b/chrome/renderer/pepper_devices.cc
index 407d454..aa98711 100644
--- a/chrome/renderer/pepper_devices.cc
+++ b/chrome/renderer/pepper_devices.cc
@@ -9,8 +9,8 @@
#include "chrome/renderer/webplugin_delegate_pepper.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkBitmap.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
-#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/glue/plugins/webplugin.h"
namespace {
diff --git a/chrome/renderer/pepper_devices_browsertest.cc b/chrome/renderer/pepper_devices_browsertest.cc
index 963975c..e8e0bbe 100644
--- a/chrome/renderer/pepper_devices_browsertest.cc
+++ b/chrome/renderer/pepper_devices_browsertest.cc
@@ -18,9 +18,9 @@
#include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-#include "webkit/plugins/npapi/webplugin_impl.h"
+#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/glue/plugins/webplugin_impl.h"
class PepperDeviceTest;
@@ -135,9 +135,9 @@ class PepperDeviceTest : public RenderViewTest {
virtual void SetUp();
virtual void TearDown();
- webkit::npapi::PluginVersionInfo version_info_;
+ NPAPI::PluginVersionInfo version_info_;
- scoped_ptr<webkit::npapi::WebPluginImpl> plugin_;
+ scoped_ptr<webkit_glue::WebPluginImpl> plugin_;
WebPluginDelegatePepper* pepper_plugin_; // FIXME(brettw): check lifetime.
};
@@ -147,7 +147,7 @@ PepperDeviceTest::PepperDeviceTest() {
version_info_.file_description = ASCIIToWide("Pepper device test plugin");
version_info_.file_version = ASCIIToWide("1");
version_info_.mime_types = ASCIIToWide(kTestPluginMimeType);
- webkit::npapi::PluginEntryPoints entry_points = {
+ NPAPI::PluginEntryPoints entry_points = {
#if !defined(OS_POSIX) || defined(OS_MACOSX)
NP_GetEntryPoints,
#endif
@@ -163,14 +163,14 @@ PepperDeviceTest::~PepperDeviceTest() {
void PepperDeviceTest::SetUp() {
RenderViewTest::SetUp();
- webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(version_info_);
+ NPAPI::PluginList::Singleton()->RegisterInternalPlugin(version_info_);
// Create the WebKit plugin with no delegates (this seems to work
// sufficiently for the test).
WebKit::WebPluginParams params;
- plugin_.reset(new webkit::npapi::WebPluginImpl(
+ plugin_.reset(new webkit_glue::WebPluginImpl(
NULL, params, FilePath(), std::string(),
- base::WeakPtr<webkit::npapi::WebPluginPageDelegate>()));
+ base::WeakPtr<webkit_glue::WebPluginPageDelegate>()));
// Create a pepper plugin for the RenderView.
pepper_plugin_ = WebPluginDelegatePepper::Create(
@@ -201,8 +201,7 @@ void PepperDeviceTest::TearDown() {
if (pepper_plugin_)
pepper_plugin_->PluginDestroyed();
- webkit::npapi::PluginList::Singleton()->UnregisterInternalPlugin(
- version_info_.path);
+ NPAPI::PluginList::Singleton()->UnregisterInternalPlugin(version_info_.path);
RenderViewTest::TearDown();
}
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.cc b/chrome/renderer/pepper_plugin_delegate_impl.cc
index e223202..87aa127 100644
--- a/chrome/renderer/pepper_plugin_delegate_impl.cc
+++ b/chrome/renderer/pepper_plugin_delegate_impl.cc
@@ -41,7 +41,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/fileapi/file_system_callback_dispatcher.h"
-#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/plugins/ppapi/ppb_file_io_impl.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
diff --git a/chrome/renderer/pepper_scrollbar_widget.cc b/chrome/renderer/pepper_scrollbar_widget.cc
index c4878a3..63c446a 100644
--- a/chrome/renderer/pepper_scrollbar_widget.cc
+++ b/chrome/renderer/pepper_scrollbar_widget.cc
@@ -11,7 +11,7 @@
#include "skia/ext/platform_canvas.h"
#include "skia/ext/platform_device.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScrollbar.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/glue/plugins/plugin_instance.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebInputEvent;
diff --git a/chrome/renderer/pepper_widget.cc b/chrome/renderer/pepper_widget.cc
index 176510f..ba37f87 100644
--- a/chrome/renderer/pepper_widget.cc
+++ b/chrome/renderer/pepper_widget.cc
@@ -9,9 +9,9 @@
#include "chrome/renderer/pepper_scrollbar_widget.h"
#include "chrome/renderer/webplugin_delegate_pepper.h"
#include "skia/ext/platform_canvas.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
-#include "webkit/plugins/npapi/webplugin.h"
-#include "webkit/plugins/npapi/webplugin_delegate.h"
+#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/glue/plugins/webplugin_delegate.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
@@ -57,8 +57,8 @@ NPError NPPaintWidget(NPP instance,
if (iter == g_widgets.Get().end())
return NPERR_INVALID_PARAM;
- webkit::npapi::PluginInstance* plugin =
- static_cast<webkit::npapi::PluginInstance*>(instance->ndata);
+ NPAPI::PluginInstance* plugin =
+ static_cast<NPAPI::PluginInstance*>(instance->ndata);
WebPluginDelegatePepper* delegate =
static_cast<WebPluginDelegatePepper*>(plugin->webplugin()->delegate());
Graphics2DDeviceContext* gdc = delegate->GetGraphicsContext(context);
@@ -135,8 +135,8 @@ void PepperWidget::Init(NPP instance, int id) {
}
void PepperWidget::WidgetPropertyChanged(NPWidgetProperty property) {
- webkit::npapi::PluginInstance* instance =
- static_cast<webkit::npapi::PluginInstance*>(instance_->ndata);
+ NPAPI::PluginInstance* instance =
+ static_cast<NPAPI::PluginInstance*>(instance_->ndata);
NPPExtensions* extensions = NULL;
instance->NPP_GetValue(NPPVPepperExtensions, &extensions);
if (!extensions)
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc
index 495a234..1396713 100644
--- a/chrome/renderer/render_process_impl.cc
+++ b/chrome/renderer/render_process_impl.cc
@@ -35,8 +35,8 @@
#include "native_client/src/shared/imc/nacl_imc.h"
#include "native_client/src/trusted/plugin/nacl_entry_points.h"
#include "skia/ext/platform_canvas.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
-#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/glue/plugins/plugin_lib.h"
#include "webkit/glue/webkit_glue.h"
#if defined(OS_MACOSX)
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 5dd3359..2c50d8e 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -172,18 +172,18 @@
#include "webkit/glue/image_resource_fetcher.h"
#include "webkit/glue/media/video_renderer_impl.h"
#include "webkit/glue/password_form_dom_manager.h"
+#include "webkit/glue/plugins/default_plugin_shared.h"
+#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/glue/plugins/webplugin_delegate.h"
+#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/glue/plugins/webplugin_impl.h"
+#include "webkit/glue/plugins/webview_plugin.h"
#include "webkit/glue/resource_fetcher.h"
#include "webkit/glue/site_isolation_metrics.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webmediaplayer_impl.h"
-#include "webkit/plugins/npapi/default_plugin_shared.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-#include "webkit/plugins/npapi/webplugin_delegate.h"
-#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
-#include "webkit/plugins/npapi/webplugin_impl.h"
-#include "webkit/plugins/npapi/webview_plugin.h"
#include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
#if defined(OS_WIN)
@@ -842,7 +842,7 @@ void RenderView::PluginCrashed(const FilePath& plugin_path) {
WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame,
const WebPluginParams& params) {
- webkit::npapi::WebPluginInfo info;
+ WebPluginInfo info;
bool found;
ContentSetting setting;
std::string mime_type;
@@ -2026,15 +2026,14 @@ void RenderView::OnMissingPluginStatus(
#if defined(OS_WIN)
if (!first_default_plugin_) {
// Show the InfoBar for the first available plugin.
- if (status == webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE) {
+ if (status == default_plugin::MISSING_PLUGIN_AVAILABLE) {
first_default_plugin_ = delegate->AsWeakPtr();
Send(new ViewHostMsg_MissingPluginStatus(routing_id_, status));
}
} else {
// Closes the InfoBar if user clicks on the plugin (instead of the InfoBar)
// to start the download/install.
- if (status ==
- webkit::npapi::default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD) {
+ if (status == default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD) {
Send(new ViewHostMsg_MissingPluginStatus(routing_id_, status));
}
}
@@ -2755,7 +2754,7 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
bool found = false;
ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT;
CommandLine* cmd = CommandLine::ForCurrentProcess();
- webkit::npapi::WebPluginInfo info;
+ WebPluginInfo info;
GURL url(params.url);
std::string actual_mime_type;
Send(new ViewHostMsg_GetPluginInfo(url,
@@ -2770,8 +2769,8 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
return NULL;
DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT);
- const webkit::npapi::PluginGroup* group =
- webkit::npapi::PluginList::Singleton()->GetPluginGroup(info);
+ const PluginGroup* group =
+ NPAPI::PluginList::Singleton()->GetPluginGroup(info);
DCHECK(group != NULL);
if (cmd->HasSwitch(switches::kBlockOutdatedPlugins) &&
@@ -2790,7 +2789,7 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
ContentSetting host_setting =
current_content_settings_.settings[CONTENT_SETTINGS_TYPE_PLUGINS];
- if (info.path.value() == webkit::npapi::kDefaultPluginLibraryName ||
+ if (info.path.value() == kDefaultPluginLibraryName ||
plugin_setting == CONTENT_SETTING_ALLOW ||
host_setting == CONTENT_SETTING_ALLOW) {
scoped_refptr<webkit::ppapi::PluginModule> pepper_module(
@@ -3940,7 +3939,7 @@ void RenderView::openFileSystem(
// webkit_glue::WebPluginPageDelegate -----------------------------------------
-webkit::npapi::WebPluginDelegate* RenderView::CreatePluginDelegate(
+webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate(
const FilePath& file_path,
const std::string& mime_type) {
if (!PluginChannelHost::IsListening())
@@ -4008,7 +4007,7 @@ webkit::npapi::WebPluginDelegate* RenderView::CreatePluginDelegate(
return pepper_plugin;
} else {
#if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac.
- return webkit::npapi::WebPluginDelegateImpl::Create(
+ return WebPluginDelegateImpl::Create(
file_path, mime_type, gfx::NativeViewFromId(host_window_));
#else
NOTIMPLEMENTED();
@@ -4035,7 +4034,7 @@ void RenderView::WillDestroyPluginWindow(gfx::PluginWindowHandle window) {
CleanupWindowInPluginMoves(window);
}
-void RenderView::DidMovePlugin(const webkit::npapi::WebPluginGeometry& move) {
+void RenderView::DidMovePlugin(const webkit_glue::WebPluginGeometry& move) {
SchedulePluginMove(move);
}
@@ -4437,19 +4436,18 @@ WebPlugin* RenderView::CreatePepperPlugin(
pepper_module, params, pepper_delegate_.AsWeakPtr());
}
-WebPlugin* RenderView::CreateNPAPIPlugin(
- WebFrame* frame,
- const WebPluginParams& params,
- const FilePath& path,
- const std::string& mime_type) {
- return new webkit::npapi::WebPluginImpl(
+WebPlugin* RenderView::CreateNPAPIPlugin(WebFrame* frame,
+ const WebPluginParams& params,
+ const FilePath& path,
+ const std::string& mime_type) {
+ return new webkit_glue::WebPluginImpl(
frame, params, path, mime_type, AsWeakPtr());
}
WebPlugin* RenderView::CreatePluginPlaceholder(
WebFrame* frame,
const WebPluginParams& params,
- const webkit::npapi::PluginGroup& group,
+ const PluginGroup& group,
int resource_id,
int message_id) {
// |blocked_plugin| will delete itself when the WebViewPlugin
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index af7b969..d7589dc 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -43,8 +43,8 @@
#include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h"
#include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNavigationType.h"
+#include "webkit/glue/plugins/webplugin_page_delegate.h"
#include "webkit/glue/webpreferences.h"
-#include "webkit/plugins/npapi/webplugin_page_delegate.h"
#if defined(OS_WIN)
// RenderView is a diamond-shaped hierarchy, with WebWidgetClient at the root.
@@ -74,6 +74,7 @@ class NotificationProvider;
class PageClickTracker;
class PasswordAutocompleteManager;
class PepperDeviceTest;
+class PluginGroup;
class PrintWebViewHelper;
class RenderViewVisitor;
class SkBitmap;
@@ -96,16 +97,12 @@ class Rect;
}
namespace webkit {
-
-namespace npapi {
-class PluginGroup;
-} // namespace npapi
-
namespace ppapi {
+
class PluginInstance;
class FullscreenContainer;
-} // namespace ppapi
+} // namespace ppapi
} // namespace webkit
namespace safe_browsing {
@@ -174,7 +171,7 @@ class RenderView : public RenderWidget,
public WebKit::WebViewClient,
public WebKit::WebFrameClient,
public WebKit::WebPageSerializerClient,
- public webkit::npapi::WebPluginPageDelegate,
+ public webkit_glue::WebPluginPageDelegate,
public base::SupportsWeakPtr<RenderView> {
public:
// Creates a new RenderView. The parent_hwnd specifies a HWND to use as the
@@ -653,12 +650,12 @@ class RenderView : public RenderWidget,
// webkit_glue::WebPluginPageDelegate implementation -------------------------
- virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
+ virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate(
const FilePath& file_path,
const std::string& mime_type);
virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle);
virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle);
- virtual void DidMovePlugin(const webkit::npapi::WebPluginGeometry& move);
+ virtual void DidMovePlugin(const webkit_glue::WebPluginGeometry& move);
virtual void DidStartLoadingForPlugin();
virtual void DidStopLoadingForPlugin();
virtual void ShowModalHTMLDialogForPlugin(
@@ -1029,7 +1026,7 @@ class RenderView : public RenderWidget,
WebKit::WebPlugin* CreatePluginPlaceholder(
WebKit::WebFrame* frame,
const WebKit::WebPluginParams& params,
- const webkit::npapi::PluginGroup& group,
+ const PluginGroup& group,
int resource_id,
int message_id);
@@ -1342,7 +1339,7 @@ class RenderView : public RenderWidget,
// Remember the first uninstalled plugin, so that we can ask the plugin
// to install itself when user clicks on the info bar.
- base::WeakPtr<webkit::npapi::WebPluginDelegate> first_default_plugin_;
+ base::WeakPtr<webkit_glue::WebPluginDelegate> first_default_plugin_;
PepperPluginDelegateImpl pepper_delegate_;
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index 041fcd9..13c194d 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -27,8 +27,8 @@
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/plugins/npapi/webplugin.h"
#if defined(OS_POSIX)
#include "ipc/ipc_channel_posix.h"
@@ -955,7 +955,7 @@ void RenderWidget::resetInputMethod() {
}
void RenderWidget::SchedulePluginMove(
- const webkit::npapi::WebPluginGeometry& move) {
+ const webkit_glue::WebPluginGeometry& move) {
size_t i = 0;
for (; i < plugin_window_moves_.size(); ++i) {
if (plugin_window_moves_[i].window == move.window) {
diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h
index 92826e9..0fd6634 100644
--- a/chrome/renderer/render_widget.h
+++ b/chrome/renderer/render_widget.h
@@ -46,11 +46,9 @@ class WebWidget;
struct WebPopupMenuInfo;
}
-namespace webkit {
-namespace npapi {
+namespace webkit_glue {
struct WebPluginGeometry;
}
-}
// RenderWidget provides a communication bridge between a WebWidget and
// a RenderWidgetHost, the latter of which lives in a different process.
@@ -113,7 +111,7 @@ class RenderWidget : public IPC::Channel::Listener,
// Called when a plugin is moved. These events are queued up and sent with
// the next paint or scroll message to the host.
- void SchedulePluginMove(const webkit::npapi::WebPluginGeometry& move);
+ void SchedulePluginMove(const webkit_glue::WebPluginGeometry& move);
// Called when a plugin window has been destroyed, to make sure the currently
// pending moves don't try to reference it.
@@ -339,7 +337,7 @@ class RenderWidget : public IPC::Channel::Listener,
WebKit::WebPopupType popup_type_;
// Holds all the needed plugin window moves for a scroll.
- typedef std::vector<webkit::npapi::WebPluginGeometry> WebPluginGeometryVector;
+ typedef std::vector<webkit_glue::WebPluginGeometry> WebPluginGeometryVector;
WebPluginGeometryVector plugin_window_moves_;
// A custom background for the widget.
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index ae5984b..5cae2a9 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -205,8 +205,7 @@ bool ClipboardReadFilenames(Clipboard::Buffer buffer,
return result;
}
-void GetPlugins(bool refresh,
- std::vector<webkit::npapi::WebPluginInfo>* plugins) {
+void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
if (!RenderThread::current()->plugin_refresh_allowed())
refresh = false;
RenderThread::current()->Send(new ViewHostMsg_GetPlugins(refresh, plugins));
diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc
index 68a14ad..1d2be20 100644
--- a/chrome/renderer/webplugin_delegate_pepper.cc
+++ b/chrome/renderer/webplugin_delegate_pepper.cc
@@ -55,26 +55,26 @@
#include "third_party/npapi/bindings/npapi_extensions_private.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
+#include "webkit/glue/plugins/plugin_constants_win.h"
+#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/glue/plugins/plugin_lib.h"
+#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/glue/plugins/plugin_host.h"
+#include "webkit/glue/plugins/plugin_stream_url.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/plugins/npapi/plugin_constants_win.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
-#include "webkit/plugins/npapi/plugin_lib.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-#include "webkit/plugins/npapi/plugin_host.h"
-#include "webkit/plugins/npapi/plugin_stream_url.h"
#if defined(ENABLE_GPU)
-#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/glue/plugins/plugin_constants_win.h"
#endif
#if defined(ENABLE_GPU)
using gpu::Buffer;
#endif
-using webkit::npapi::WebPlugin;
-using webkit::npapi::WebPluginDelegate;
-using webkit::npapi::WebPluginResourceClient;
+using webkit_glue::WebPlugin;
+using webkit_glue::WebPluginDelegate;
+using webkit_glue::WebPluginResourceClient;
using WebKit::WebCursorInfo;
using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
@@ -114,8 +114,8 @@ WebPluginDelegatePepper* WebPluginDelegatePepper::Create(
const FilePath& filename,
const std::string& mime_type,
const base::WeakPtr<RenderView>& render_view) {
- scoped_refptr<webkit::npapi::PluginLib> plugin_lib(
- webkit::npapi::PluginLib::CreatePluginLib(filename));
+ scoped_refptr<NPAPI::PluginLib> plugin_lib(
+ NPAPI::PluginLib::CreatePluginLib(filename));
if (plugin_lib.get() == NULL)
return NULL;
@@ -123,7 +123,7 @@ WebPluginDelegatePepper* WebPluginDelegatePepper::Create(
if (err != NPERR_NO_ERROR)
return NULL;
- scoped_refptr<webkit::npapi::PluginInstance> instance(
+ scoped_refptr<NPAPI::PluginInstance> instance(
plugin_lib->CreateInstance(mime_type));
return new WebPluginDelegatePepper(render_view,
instance.get());
@@ -544,7 +544,7 @@ string16 WebPluginDelegatePepper::GetSelectedText(bool html) const {
return string16();
string16 rv = UTF8ToUTF16(static_cast<char*>(text));
- webkit::npapi::PluginHost::Singleton()->host_functions()->memfree(text);
+ NPAPI::PluginHost::Singleton()->host_functions()->memfree(text);
return rv;
}
@@ -680,8 +680,8 @@ NPError WebPluginDelegatePepper::Device3DInitializeContext(
// Create an instance of the GPU plugin that is responsible for 3D
// rendering.
- nested_delegate_ = new WebPluginDelegateProxy(
- "application/vnd.google.chrome.gpu-plugin", render_view_);
+ nested_delegate_ = new WebPluginDelegateProxy(kGPUPluginMimeType,
+ render_view_);
// TODO(apatrick): should the GPU plugin be attached to plugin_?
if (nested_delegate_->Initialize(GURL(),
@@ -1270,8 +1270,7 @@ bool WebPluginDelegatePepper::VectorPrintPage(int page_number,
size_in_pixels.height(), true, false, true, true);
#endif // defined(OS_WIN)
- webkit::npapi::PluginHost::Singleton()->host_functions()->memfree(
- pdf_output);
+ NPAPI::PluginHost::Singleton()->host_functions()->memfree(pdf_output);
return ret;
}
@@ -1379,7 +1378,7 @@ void WebPluginDelegatePepper::PrintEnd() {
WebPluginDelegatePepper::WebPluginDelegatePepper(
const base::WeakPtr<RenderView>& render_view,
- webkit::npapi::PluginInstance *instance)
+ NPAPI::PluginInstance *instance)
: render_view_(render_view),
plugin_(NULL),
instance_(instance),
@@ -1637,7 +1636,7 @@ void WebPluginDelegatePepper::SendNestedDelegateGeometryToBrowser(
return;
}
- webkit::npapi::WebPluginGeometry geom;
+ webkit_glue::WebPluginGeometry geom;
geom.window = nested_delegate_->GetPluginWindowHandle();
geom.window_rect = window_rect;
geom.clip_rect = clip_rect;
diff --git a/chrome/renderer/webplugin_delegate_pepper.h b/chrome/renderer/webplugin_delegate_pepper.h
index 6285424..cfe34a1 100644
--- a/chrome/renderer/webplugin_delegate_pepper.h
+++ b/chrome/renderer/webplugin_delegate_pepper.h
@@ -22,21 +22,19 @@
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileChooserCompletion.h"
-#include "webkit/plugins/npapi/webplugin_delegate.h"
+#include "webkit/glue/plugins/webplugin_delegate.h"
class FilePath;
class RenderView;
class WebCursor;
class WebPluginDelegateProxy;
-namespace webkit {
-namespace npapi {
+namespace NPAPI {
class PluginInstance;
}
-}
// An implementation of WebPluginDelegate for Pepper in-process plugins.
-class WebPluginDelegatePepper : public webkit::npapi::WebPluginDelegate,
+class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate,
public WebKit::WebFileChooserCompletion {
public:
static WebPluginDelegatePepper* Create(
@@ -44,7 +42,7 @@ class WebPluginDelegatePepper : public webkit::npapi::WebPluginDelegate,
const std::string& mime_type,
const base::WeakPtr<RenderView>& render_view);
- webkit::npapi::PluginInstance* instance() { return instance_.get(); }
+ NPAPI::PluginInstance* instance() { return instance_.get(); }
// WebKit::WebFileChooserCompletion implementation.
virtual void didChooseFile(
@@ -54,7 +52,7 @@ class WebPluginDelegatePepper : public webkit::npapi::WebPluginDelegate,
virtual bool Initialize(const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
- webkit::npapi::WebPlugin* plugin,
+ webkit_glue::WebPlugin* plugin,
bool load_manually);
virtual void PluginDestroyed();
virtual void UpdateGeometry(const gfx::Rect& window_rect,
@@ -81,9 +79,9 @@ class WebPluginDelegatePepper : public webkit::npapi::WebPluginDelegate,
virtual void DidFinishManualLoading();
virtual void DidManualLoadFail();
virtual void InstallMissingPlugin();
- virtual webkit::npapi::WebPluginResourceClient* CreateResourceClient(
+ virtual webkit_glue::WebPluginResourceClient* CreateResourceClient(
unsigned long resource_id, const GURL& url, int notify_id);
- virtual webkit::npapi::WebPluginResourceClient* CreateSeekableResourceClient(
+ virtual webkit_glue::WebPluginResourceClient* CreateSeekableResourceClient(
unsigned long resource_id, int range_request_id);
virtual bool StartFind(const string16& search_text,
bool case_sensitive,
@@ -210,7 +208,7 @@ class WebPluginDelegatePepper : public webkit::npapi::WebPluginDelegate,
private:
WebPluginDelegatePepper(
const base::WeakPtr<RenderView>& render_view,
- webkit::npapi::PluginInstance *instance);
+ NPAPI::PluginInstance *instance);
~WebPluginDelegatePepper();
// Set a task that calls the repaint callback the next time the window
@@ -277,8 +275,8 @@ class WebPluginDelegatePepper : public webkit::npapi::WebPluginDelegate,
base::WeakPtr<RenderView> render_view_;
- webkit::npapi::WebPlugin* plugin_;
- scoped_refptr<webkit::npapi::PluginInstance> instance_;
+ webkit_glue::WebPlugin* plugin_;
+ scoped_refptr<NPAPI::PluginInstance> instance_;
NPWindow window_;
gfx::Rect window_rect_;
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index 1b2e7d7..5c8d550 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -48,7 +48,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
-#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webkit_glue.h"
#if defined(OS_POSIX)
@@ -65,7 +65,7 @@ using WebKit::WebView;
// Proxy for WebPluginResourceClient. The object owns itself after creation,
// deleting itself after its callback has been called.
-class ResourceClientProxy : public webkit::npapi::WebPluginResourceClient {
+class ResourceClientProxy : public webkit_glue::WebPluginResourceClient {
public:
ResourceClientProxy(PluginChannelHost* channel, int instance_id)
: channel_(channel), instance_id_(instance_id), resource_id_(0),
@@ -267,11 +267,10 @@ static bool SilverlightColorIsTransparent(const std::string& color) {
return false;
}
-bool WebPluginDelegateProxy::Initialize(
- const GURL& url,
+bool WebPluginDelegateProxy::Initialize(const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
- webkit::npapi::WebPlugin* plugin,
+ webkit_glue::WebPlugin* plugin,
bool load_manually) {
IPC::ChannelHandle channel_handle;
if (!RenderThread::current()->Send(new ViewHostMsg_OpenChannelToPlugin(
@@ -1350,7 +1349,7 @@ void WebPluginDelegateProxy::OnHandleURLRequest(
params.popups_allowed, params.notify_redirects);
}
-webkit::npapi::WebPluginResourceClient*
+webkit_glue::WebPluginResourceClient*
WebPluginDelegateProxy::CreateResourceClient(
unsigned long resource_id, const GURL& url, int notify_id) {
if (!channel_host_)
@@ -1362,7 +1361,7 @@ WebPluginDelegateProxy::CreateResourceClient(
return proxy;
}
-webkit::npapi::WebPluginResourceClient*
+webkit_glue::WebPluginResourceClient*
WebPluginDelegateProxy::CreateSeekableResourceClient(
unsigned long resource_id, int range_request_id) {
if (!channel_host_)
@@ -1405,7 +1404,7 @@ bool WebPluginDelegateProxy::BindFakePluginWindowHandle(bool opaque) {
// Since this isn't a real window, it doesn't get initial size and location
// information the way a real windowed plugin would, so we need to feed it its
// starting geometry.
- webkit::npapi::WebPluginGeometry geom;
+ webkit_glue::WebPluginGeometry geom;
geom.window = fake_window;
geom.window_rect = plugin_rect_;
geom.clip_rect = clip_rect_;
@@ -1544,7 +1543,7 @@ bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() {
// The move networks plugin needs to be informed of geometry updates
// synchronously.
- std::vector<webkit::npapi::WebPluginMimeType>::iterator index;
+ std::vector<WebPluginMimeType>::iterator index;
for (index = info_.mime_types.begin(); index != info_.mime_types.end();
index++) {
if (index->mime_type == "application/x-vnd.moveplayer.qm" ||
diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h
index 30e212e..2c20583 100644
--- a/chrome/renderer/webplugin_delegate_proxy.h
+++ b/chrome/renderer/webplugin_delegate_proxy.h
@@ -18,8 +18,8 @@
#include "googleurl/src/gurl.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_message.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
-#include "webkit/plugins/npapi/webplugin_delegate.h"
+#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/glue/plugins/webplugin_delegate.h"
#if defined(OS_MACOSX)
#include "base/hash_tables.h"
@@ -44,16 +44,14 @@ namespace skia {
class PlatformCanvas;
}
-namespace webkit {
-namespace npapi {
+namespace webkit_glue {
class WebPlugin;
}
-}
// An implementation of WebPluginDelegate that proxies all calls to
// the plugin process.
class WebPluginDelegateProxy
- : public webkit::npapi::WebPluginDelegate,
+ : public webkit_glue::WebPluginDelegate,
public IPC::Channel::Listener,
public IPC::Message::Sender,
public base::SupportsWeakPtr<WebPluginDelegateProxy> {
@@ -66,7 +64,7 @@ class WebPluginDelegateProxy
virtual bool Initialize(const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
- webkit::npapi::WebPlugin* plugin,
+ webkit_glue::WebPlugin* plugin,
bool load_manually);
virtual void UpdateGeometry(const gfx::Rect& window_rect,
const gfx::Rect& clip_rect);
@@ -115,9 +113,9 @@ class WebPluginDelegateProxy
virtual void DidFinishManualLoading();
virtual void DidManualLoadFail();
virtual void InstallMissingPlugin();
- virtual webkit::npapi::WebPluginResourceClient* CreateResourceClient(
+ virtual webkit_glue::WebPluginResourceClient* CreateResourceClient(
unsigned long resource_id, const GURL& url, int notify_id);
- virtual webkit::npapi::WebPluginResourceClient* CreateSeekableResourceClient(
+ virtual webkit_glue::WebPluginResourceClient* CreateSeekableResourceClient(
unsigned long resource_id, int range_request_id);
CommandBufferProxy* CreateCommandBuffer();
@@ -233,13 +231,13 @@ class WebPluginDelegateProxy
#endif
base::WeakPtr<RenderView> render_view_;
- webkit::npapi::WebPlugin* plugin_;
+ webkit_glue::WebPlugin* plugin_;
bool uses_shared_bitmaps_;
gfx::PluginWindowHandle window_;
scoped_refptr<PluginChannelHost> channel_host_;
std::string mime_type_;
int instance_id_;
- webkit::npapi::WebPluginInfo info_;
+ WebPluginInfo info_;
gfx::Rect plugin_rect_;
gfx::Rect clip_rect_;
diff --git a/chrome/test/plugin/plugin_test.cpp b/chrome/test/plugin/plugin_test.cpp
index ed052a0..c68dd99 100644
--- a/chrome/test/plugin/plugin_test.cpp
+++ b/chrome/test/plugin/plugin_test.cpp
@@ -48,9 +48,8 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_status.h"
#include "third_party/npapi/bindings/npapi.h"
-#include "webkit/plugins/npapi/plugin_constants_win.h"
-#include "webkit/plugins/npapi/plugin_list.h"
-#include "webkit/plugins/plugin_switches.h"
+#include "webkit/glue/plugins/plugin_constants_win.h"
+#include "webkit/glue/plugins/plugin_list.h"
#if defined(OS_WIN)
#include "base/win/registry.h"
@@ -91,7 +90,7 @@ class PluginTest : public UITest {
} else if (strcmp(test_info->name(), "MediaPlayerOld") == 0) {
// When testing the old WMP plugin, we need to force Chrome to not load
// the new plugin.
- launch_arguments_.AppendSwitch(switches::kUseOldWMPPlugin);
+ launch_arguments_.AppendSwitch(kUseOldWMPPluginSwitch);
} else if (strcmp(test_info->name(), "FlashSecurity") == 0) {
launch_arguments_.AppendSwitchASCII(switches::kTestSandbox,
"security_tests.dll");