summaryrefslogtreecommitdiffstats
path: root/chrome/browser
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/browser
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/browser')
-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
47 files changed, 211 insertions, 267 deletions
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);