summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 06:27:50 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 06:27:50 +0000
commit191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c (patch)
treeb982048e66a62646694c16c2cb10cb7ad30d8912 /chrome/browser
parentcfef856dd2ccece3cea13ccc96ac9579fd2b30b5 (diff)
downloadchromium_src-191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c.zip
chromium_src-191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c.tar.gz
chromium_src-191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c.tar.bz2
Re-land earlier patch that moves the NPAPI implementation from webkit/glue/plugins to webkit/plugins/npapi
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to '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/chromeos/gview_request_interceptor.cc2
-rw-r--r--chrome/browser/chromeos/plugin_selection_policy.cc5
-rw-r--r--chrome/browser/chromeos/plugin_selection_policy.h5
-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
50 files changed, 274 insertions, 216 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index be9e2d2..4108f69 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -102,7 +102,6 @@
#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 fcc609f..129dc8f 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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -2993,10 +2993,11 @@ void TestingAutomationProvider::GetPluginsInfo(
Browser* browser,
DictionaryValue* args,
IPC::Message* reply_message) {
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
ListValue* items = new ListValue;
- for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin();
+ for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it =
+ plugins.begin();
it != plugins.end();
++it) {
DictionaryValue* item = new DictionaryValue;
@@ -3007,7 +3008,7 @@ void TestingAutomationProvider::GetPluginsInfo(
item->SetBoolean("enabled", it->enabled);
// Add info about mime types.
ListValue* mime_types = new ListValue();
- for (std::vector<WebPluginMimeType>::const_iterator type_it =
+ for (std::vector<webkit::npapi::WebPluginMimeType>::const_iterator type_it =
it->mime_types.begin();
type_it != it->mime_types.end();
++type_it) {
@@ -3046,7 +3047,8 @@ void TestingAutomationProvider::EnablePlugin(Browser* browser,
if (!args->GetString("path", &path)) {
reply.SendError("path not specified.");
return;
- } else if (!NPAPI::PluginList::Singleton()->EnablePlugin(FilePath(path))) {
+ } else if (!webkit::npapi::PluginList::Singleton()->EnablePlugin(
+ FilePath(path))) {
reply.SendError(StringPrintf("Could not enable plugin for path %s.",
path.c_str()));
return;
@@ -3065,7 +3067,8 @@ void TestingAutomationProvider::DisablePlugin(Browser* browser,
if (!args->GetString("path", &path)) {
reply.SendError("path not specified.");
return;
- } else if (!NPAPI::PluginList::Singleton()->DisablePlugin(FilePath(path))) {
+ } else if (!webkit::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/chromeos/gview_request_interceptor.cc b/chrome/browser/chromeos/gview_request_interceptor.cc
index ea42d37..59ded54 100644
--- a/chrome/browser/chromeos/gview_request_interceptor.cc
+++ b/chrome/browser/chromeos/gview_request_interceptor.cc
@@ -63,7 +63,7 @@ net::URLRequestJob* GViewRequestInterceptor::MaybeInterceptResponse(
// redirect PDF files to Google Document Viewer.
if (mime_type == kPdfMimeType) {
FilePath pdf_path;
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path);
if (NPAPI::PluginList::Singleton()->GetPluginInfoByPath(pdf_path, &info) &&
info.enabled)
diff --git a/chrome/browser/chromeos/plugin_selection_policy.cc b/chrome/browser/chromeos/plugin_selection_policy.cc
index 477965a..dd261ea 100644
--- a/chrome/browser/chromeos/plugin_selection_policy.cc
+++ b/chrome/browser/chromeos/plugin_selection_policy.cc
@@ -120,8 +120,9 @@ bool PluginSelectionPolicy::InitFromFile(const FilePath& policy_file) {
int PluginSelectionPolicy::FindFirstAllowed(
const GURL& url,
- const std::vector<WebPluginInfo>& info) {
- for (std::vector<WebPluginInfo>::size_type i = 0; i < info.size(); ++i) {
+ const std::vector<webkit::npapi::WebPluginInfo>& info) {
+ for (std::vector<webkit::npapi::WebPluginInfo>::size_type i = 0;
+ i < info.size(); ++i) {
if (IsAllowed(url, info[i].path))
return i;
}
diff --git a/chrome/browser/chromeos/plugin_selection_policy.h b/chrome/browser/chromeos/plugin_selection_policy.h
index 1bf60a0..08816bf 100644
--- a/chrome/browser/chromeos/plugin_selection_policy.h
+++ b/chrome/browser/chromeos/plugin_selection_policy.h
@@ -11,7 +11,7 @@
#include "base/gtest_prod_util.h"
#include "base/ref_counted.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
class GURL;
class FilePath;
@@ -45,7 +45,8 @@ class PluginSelectionPolicy
// allowed (or if the info vector is empty). InitFromFile must
// complete before any calls to FindFirstAllowed happen or it will
// assert.
- int FindFirstAllowed(const GURL& url, const std::vector<WebPluginInfo>& info);
+ int FindFirstAllowed(const GURL& url,
+ const std::vector<webkit::npapi::WebPluginInfo>& info);
// Applies the current policy to the given path using the url to
// look up what the policy for that domain is. Returns true if the
diff --git a/chrome/browser/dom_ui/plugins_ui.cc b/chrome/browser/dom_ui/plugins_ui.cc
index 6746fdd..aaf59f1 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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -223,7 +223,8 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) {
plugin_updater->EnablePluginGroup(enable, group_name);
if (enable) {
// See http://crbug.com/50105 for background.
- string16 adobereader = ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName);
+ string16 adobereader = ASCIIToUTF16(
+ webkit::npapi::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 a53d69c..f8c36f0 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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/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(
- NPAPI::PluginList::Singleton()->GetPluginGroupName(*it));
+ webkit::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 8399464..9b719ca 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/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/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 (WebPluginDelegateImpl::GetPluginNameFromWindow(window_to_check,
- plugin_name)) {
+ if (webkit::npapi::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 d0a1f01..bf54134 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -25,6 +25,7 @@
#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)
@@ -237,12 +238,13 @@ void MetricsLog::WriteRealtimeStabilityAttributes(PrefService* pref) {
}
void MetricsLog::WritePluginList(
- const std::vector<WebPluginInfo>& plugin_list) {
+ const std::vector<webkit::npapi::WebPluginInfo>& plugin_list) {
DCHECK(!locked_);
OPEN_ELEMENT_FOR_SCOPE("plugins");
- for (std::vector<WebPluginInfo>::const_iterator iter = plugin_list.begin();
+ for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator iter =
+ plugin_list.begin();
iter != plugin_list.end(); ++iter) {
OPEN_ELEMENT_FOR_SCOPE("plugin");
@@ -262,7 +264,7 @@ void MetricsLog::WriteInstallElement() {
}
void MetricsLog::RecordEnvironment(
- const std::vector<WebPluginInfo>& plugin_list,
+ const std::vector<webkit::npapi::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 8f35705..0cb8b29 100644
--- a/chrome/browser/metrics/metrics_log.h
+++ b/chrome/browser/metrics/metrics_log.h
@@ -12,13 +12,18 @@
#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
@@ -35,8 +40,9 @@ 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<WebPluginInfo>& plugin_list,
- const DictionaryValue* profile_metrics);
+ void RecordEnvironment(
+ const std::vector<webkit::npapi::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.
@@ -80,7 +86,8 @@ class MetricsLog : public MetricsLogBase {
void WriteRealtimeStabilityAttributes(PrefService* pref);
// Writes the list of installed plugins.
- void WritePluginList(const std::vector<WebPluginInfo>& plugin_list);
+ void WritePluginList(
+ const std::vector<webkit::npapi::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 5aea04a..5e1af15 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/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
#include "libxml/xmlwriter.h"
// TODO(port): port browser_distribution.h.
@@ -336,8 +336,9 @@ class MetricsMemoryDetails : public MemoryDetails {
class MetricsService::InitTaskComplete : public Task {
public:
- explicit InitTaskComplete(const std::string& hardware_class,
- const std::vector<WebPluginInfo>& plugins)
+ explicit InitTaskComplete(
+ const std::string& hardware_class,
+ const std::vector<webkit::npapi::WebPluginInfo>& plugins)
: hardware_class_(hardware_class), plugins_(plugins) {}
virtual void Run() {
@@ -347,7 +348,7 @@ class MetricsService::InitTaskComplete : public Task {
private:
std::string hardware_class_;
- std::vector<WebPluginInfo> plugins_;
+ std::vector<webkit::npapi::WebPluginInfo> plugins_;
};
class MetricsService::InitTask : public Task {
@@ -356,12 +357,12 @@ class MetricsService::InitTask : public Task {
: callback_loop_(callback_loop) {}
virtual void Run() {
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::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(
@@ -801,7 +802,7 @@ void MetricsService::InitializeMetricsState() {
void MetricsService::OnInitTaskComplete(
const std::string& hardware_class,
- const std::vector<WebPluginInfo>& plugins) {
+ const std::vector<webkit::npapi::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 f1cfbb2..fa15a12 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -33,7 +33,12 @@ 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.
@@ -155,7 +160,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<WebPluginInfo>& plugins);
+ const std::vector<webkit::npapi::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.
@@ -418,7 +423,7 @@ class MetricsService : public NotificationObserver,
std::string hardware_class_;
// The list of plugins which was retrieved on the file thread.
- std::vector<WebPluginInfo> plugins_;
+ std::vector<webkit::npapi::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 77b2a2f..1c88524 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<PluginGroup>& plugins) {
+ std::vector<webkit::npapi::PluginGroup>& plugins) {
plugins_ = plugins;
}
void MockPluginExceptionsTableModel::GetPlugins(
- std::vector<PluginGroup>* plugin_groups) {
+ std::vector<webkit::npapi::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 15a1c5b..c63d67f 100644
--- a/chrome/browser/mock_plugin_exceptions_table_model.h
+++ b/chrome/browser/mock_plugin_exceptions_table_model.h
@@ -17,13 +17,14 @@ class MockPluginExceptionsTableModel : public PluginExceptionsTableModel {
: PluginExceptionsTableModel(map, otr_map) {}
virtual ~MockPluginExceptionsTableModel() {}
- void set_plugins(std::vector<PluginGroup>& plugins);
+ void set_plugins(std::vector<webkit::npapi::PluginGroup>& plugins);
protected:
- virtual void GetPlugins(std::vector<PluginGroup>* plugin_groups);
+ virtual void GetPlugins(
+ std::vector<webkit::npapi::PluginGroup>* plugin_groups);
private:
- std::vector<PluginGroup> plugins_;
+ std::vector<webkit::npapi::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 55e1405..2b60d66 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/glue/plugins/carbon_plugin_window_tracker_mac.h"
+#include "webkit/plugins/npapi/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 =
- CarbonPluginWindowTracker::SharedInstance()->GetDelegateForDummyWindow(
- window);
+ webkit::npapi::CarbonPluginWindowTracker::SharedInstance()->
+ GetDelegateForDummyWindow(window);
return delegate ? IsContainingWindowActive(delegate)
: IsWindowActive(window);
}
static Boolean ChromePluginIsWindowHilited(WindowRef window) {
const OpaquePluginRef delegate =
- CarbonPluginWindowTracker::SharedInstance()->GetDelegateForDummyWindow(
- window);
+ webkit::npapi::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();
- CarbonPluginWindowTracker* tracker =
- CarbonPluginWindowTracker::SharedInstance();
+ webkit::npapi::CarbonPluginWindowTracker* tracker =
+ webkit::npapi::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 74aa07c..fd7d9bd 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/glue/plugins/plugin_group.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_group.h"
+#include "webkit/plugins/npapi/plugin_list.h"
#if defined(OS_POSIX)
#include "ipc/ipc_channel_posix.h"
@@ -65,7 +65,8 @@ bool PluginDataRemover::OffTheRecord() {
return false;
}
-void PluginDataRemover::SetPluginInfo(const WebPluginInfo& info) {
+void PluginDataRemover::SetPluginInfo(
+ const webkit::npapi::WebPluginInfo& info) {
}
void PluginDataRemover::OnChannelOpened(const IPC::ChannelHandle& handle) {
@@ -142,16 +143,16 @@ void PluginDataRemover::SignalDone() {
bool PluginDataRemover::IsSupported() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
bool allow_wildcard = false;
- WebPluginInfo plugin;
+ webkit::npapi::WebPluginInfo plugin;
std::string mime_type;
- if (!NPAPI::PluginList::Singleton()->GetPluginInfo(GURL(),
- g_flash_mime_type,
- allow_wildcard,
- &plugin,
- &mime_type))
+ if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(GURL(),
+ g_flash_mime_type,
+ allow_wildcard,
+ &plugin,
+ &mime_type))
return false;
scoped_ptr<Version> version(
- PluginGroup::CreateVersionFromString(plugin.version));
+ webkit::npapi::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 03b7e6f..58387fe 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 WebPluginInfo& info);
+ virtual void SetPluginInfo(const webkit::npapi::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 7ad5b13..5b2a2c1 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<PluginGroup>* plugin_groups) {
- NPAPI::PluginList::Singleton()->GetPluginGroups(false, plugin_groups);
+ std::vector<webkit::npapi::PluginGroup>* plugin_groups) {
+ webkit::npapi::PluginList::Singleton()->GetPluginGroups(false, plugin_groups);
}
void PluginExceptionsTableModel::LoadSettings() {
int group_id = 0;
- std::vector<PluginGroup> plugins;
+ std::vector<webkit::npapi::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 d345b95..045c218 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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
struct WebPluginInfo;
@@ -48,7 +48,8 @@ class PluginExceptionsTableModel : public RemoveRowsTableModel,
protected:
// Subclasses can override this method for testing.
- virtual void GetPlugins(std::vector<PluginGroup>* plugin_groups);
+ virtual void GetPlugins(
+ std::vector<webkit::npapi::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 b96f3fb..e7efcca 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/glue/plugins/plugin_group.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_group.h"
+#include "webkit/plugins/npapi/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<PluginGroup> plugins;
- WebPluginInfo foo_plugin;
+ std::vector<webkit::npapi::PluginGroup> plugins;
+ webkit::npapi::WebPluginInfo foo_plugin;
foo_plugin.path = FilePath(FILE_PATH_LITERAL("a-foo"));
foo_plugin.name = ASCIIToUTF16("FooPlugin");
foo_plugin.enabled = true;
- scoped_ptr<PluginGroup> foo_group(
- PluginGroup::FromWebPluginInfo(foo_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> foo_group(
+ webkit::npapi::PluginGroup::FromWebPluginInfo(foo_plugin));
plugins.push_back(*foo_group);
- WebPluginInfo bar_plugin;
+ webkit::npapi::WebPluginInfo bar_plugin;
bar_plugin.path = FilePath(FILE_PATH_LITERAL("b-bar"));
bar_plugin.name = ASCIIToUTF16("BarPlugin");
bar_plugin.enabled = true;
- scoped_ptr<PluginGroup> bar_group(
- PluginGroup::FromWebPluginInfo(bar_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> bar_group(
+ webkit::npapi::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 b6ceb3c..8d63679 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/glue/plugins/default_plugin_shared.h"
+#include "webkit/plugins/npapi/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 default_plugin::MISSING_PLUGIN_AVAILABLE: {
+ case webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE: {
tab_contents_->AddInfoBar(this);
break;
}
- case default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: {
+ case webkit::npapi::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 0e7735a..72d8aed 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 WebPluginInfo& info,
+bool PluginProcessHost::Init(const webkit::npapi::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 89e368a..b98840e 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/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/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 WebPluginInfo& info) = 0;
+ virtual void SetPluginInfo(const webkit::npapi::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 WebPluginInfo& info, const std::string& locale);
+ bool Init(const webkit::npapi::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 WebPluginInfo& info() const { return info_; }
+ const webkit::npapi::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.
- WebPluginInfo info_;
+ webkit::npapi::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 548bd3c..50677f7 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -34,12 +34,13 @@
#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"
@@ -94,10 +95,10 @@ PluginService::PluginService()
const CommandLine* command_line = CommandLine::ForCurrentProcess();
FilePath path = command_line->GetSwitchValuePath(switches::kLoadPlugin);
if (!path.empty())
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
path = command_line->GetSwitchValuePath(switches::kExtraPluginDir);
if (!path.empty())
- NPAPI::PluginList::Singleton()->AddExtraPluginDir(path);
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(path);
chrome::RegisterInternalDefaultPlugin();
@@ -105,7 +106,7 @@ PluginService::PluginService()
if (!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableInternalFlash) &&
PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) {
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
}
#ifndef DISABLE_NACL
@@ -123,9 +124,9 @@ PluginService::PluginService()
#if defined(OS_WIN)
hkcu_key_.Create(
- HKEY_CURRENT_USER, kRegistryMozillaPlugins, KEY_NOTIFY);
+ HKEY_CURRENT_USER, webkit::npapi::kRegistryMozillaPlugins, KEY_NOTIFY);
hklm_key_.Create(
- HKEY_LOCAL_MACHINE, kRegistryMozillaPlugins, KEY_NOTIFY);
+ HKEY_LOCAL_MACHINE, webkit::npapi::kRegistryMozillaPlugins, KEY_NOTIFY);
if (hkcu_key_.StartWatching()) {
hkcu_event_.reset(new base::WaitableEvent(hkcu_key_.watch_event()));
hkcu_watcher_.StartWatching(hkcu_event_.get(), this);
@@ -140,7 +141,7 @@ PluginService::PluginService()
// e.g. ~/.config/chromium/Plugins.
FilePath user_data_dir;
if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
- NPAPI::PluginList::Singleton()->AddExtraPluginDir(
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(
user_data_dir.Append("Plugins"));
}
#endif
@@ -212,9 +213,9 @@ PluginProcessHost* PluginService::FindOrStartPluginProcess(
if (plugin_host)
return plugin_host;
- WebPluginInfo info;
- if (!NPAPI::PluginList::Singleton()->GetPluginInfoByPath(
- plugin_path, &info)) {
+ webkit::npapi::WebPluginInfo info;
+ if (!webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath(
+ plugin_path, &info)) {
return NULL;
}
@@ -246,7 +247,7 @@ void PluginService::GetAllowedPluginForOpenChannelToPlugin(
const std::string& mime_type,
PluginProcessHost::Client* client) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
bool found = GetFirstAllowedPluginInfo(url, mime_type, &info, NULL);
FilePath plugin_path;
if (found && info.enabled)
@@ -275,16 +276,16 @@ void PluginService::FinishOpenChannelToPlugin(
bool PluginService::GetFirstAllowedPluginInfo(
const GURL& url,
const std::string& mime_type,
- WebPluginInfo* info,
+ webkit::npapi::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<WebPluginInfo> info_array;
+ std::vector<webkit::npapi::WebPluginInfo> info_array;
std::vector<std::string> actual_mime_types;
- NPAPI::PluginList::Singleton()->GetPluginInfoArray(
+ webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
url, mime_type, allow_wildcard, &info_array, &actual_mime_types);
// Now we filter by the plugin selection policy.
@@ -298,7 +299,7 @@ bool PluginService::GetFirstAllowedPluginInfo(
}
return false;
#else
- return NPAPI::PluginList::Singleton()->GetPluginInfo(
+ return webkit::npapi::PluginList::Singleton()->GetPluginInfo(
url, mime_type, allow_wildcard, info, actual_mime_type);
#endif
}
@@ -319,7 +320,7 @@ void PluginService::OnWaitableEventSignaled(
hklm_key_.StartWatching();
}
- NPAPI::PluginList::Singleton()->RefreshPlugins();
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins();
PurgePluginListCache(true);
#endif // defined(OS_WIN)
}
@@ -340,8 +341,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];
- NPAPI::PluginList::Singleton()->RefreshPlugins();
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(plugin.path);
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins();
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(plugin.path);
plugins_changed = true;
if (!plugin.is_public)
private_plugins_[plugin.path] = extension->url();
@@ -359,8 +360,9 @@ void PluginService::Observe(NotificationType type,
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableFunction(&ForceShutdownPlugin,
plugin.path));
- NPAPI::PluginList::Singleton()->RefreshPlugins();
- NPAPI::PluginList::Singleton()->RemoveExtraPluginPath(plugin.path);
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins();
+ webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath(
+ plugin.path);
plugins_changed = true;
if (!plugin.is_public)
private_plugins_.erase(plugin.path);
@@ -407,7 +409,7 @@ void PluginService::RegisterPepperPlugins() {
std::vector<PepperPluginInfo> plugins;
PepperPluginRegistry::GetList(&plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
- NPAPI::PluginVersionInfo info;
+ webkit::npapi::PluginVersionInfo info;
info.path = plugins[i].path;
info.product_name = plugins[i].name.empty() ?
plugins[i].path.BaseName().ToWStringHack() :
@@ -422,6 +424,6 @@ void PluginService::RegisterPepperPlugins() {
// or perhaps refactor the PluginList to be less specific to NPAPI.
memset(&info.entry_points, 0, sizeof(info.entry_points));
- NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info);
+ webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info);
}
}
diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h
index e83e804..a66d76ac 100644
--- a/chrome/browser/plugin_service.h
+++ b/chrome/browser/plugin_service.h
@@ -41,7 +41,13 @@ 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.
@@ -90,7 +96,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,
- WebPluginInfo* info,
+ webkit::npapi::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 8d9e82e..5fed897 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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/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 WebPluginInfo& info));
+ MOCK_METHOD1(SetPluginInfo, void(const webkit::npapi::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(kDefaultPluginLibraryName));
+ FilePath(webkit::npapi::kDefaultPluginLibraryName));
- EXPECT_EQ(default_plugin_process_host,
- plugin_service_->FindPluginProcess(FilePath(kDefaultPluginLibraryName)));
+ EXPECT_EQ(default_plugin_process_host, plugin_service_->FindPluginProcess(
+ FilePath(webkit::npapi::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.
- WebPluginInfo plugin_info;
+ webkit::npapi::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 4e54526..6950d2a 100644
--- a/chrome/browser/plugin_service_unittest.cc
+++ b/chrome/browser/plugin_service_unittest.cc
@@ -9,7 +9,6 @@
#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 40f3be1..d994efd 100644
--- a/chrome/browser/plugin_updater.cc
+++ b/chrome/browser/plugin_updater.cc
@@ -22,7 +22,8 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/pepper_plugin_registry.h"
#include "chrome/common/pref_names.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
// How long to wait to save the plugin enabled information, which might need to
// go to disk.
@@ -34,7 +35,7 @@ PluginUpdater::PluginUpdater()
}
DictionaryValue* PluginUpdater::CreatePluginFileSummary(
- const WebPluginInfo& plugin) {
+ const webkit::npapi::WebPluginInfo& plugin) {
DictionaryValue* data = new DictionaryValue();
data->SetString("path", plugin.path.value());
data->SetString("name", plugin.name);
@@ -45,8 +46,8 @@ DictionaryValue* PluginUpdater::CreatePluginFileSummary(
// static
ListValue* PluginUpdater::GetPluginGroupsData() {
- std::vector<PluginGroup> plugin_groups;
- NPAPI::PluginList::Singleton()->GetPluginGroups(true, &plugin_groups);
+ std::vector<webkit::npapi::PluginGroup> plugin_groups;
+ webkit::npapi::PluginList::Singleton()->GetPluginGroups(true, &plugin_groups);
// Construct DictionaryValues to return to the UI
ListValue* plugin_groups_data = new ListValue();
@@ -57,19 +58,20 @@ ListValue* PluginUpdater::GetPluginGroupsData() {
}
void PluginUpdater::EnablePluginGroup(bool enable, const string16& group_name) {
- if (PluginGroup::IsPluginNameDisabledByPolicy(group_name))
+ if (webkit::npapi::PluginGroup::IsPluginNameDisabledByPolicy(group_name))
enable = false;
- NPAPI::PluginList::Singleton()->EnableGroup(enable, group_name);
+ webkit::npapi::PluginList::Singleton()->EnableGroup(enable, group_name);
NotifyPluginStatusChanged();
}
void PluginUpdater::EnablePluginFile(bool enable,
const FilePath::StringType& path) {
FilePath file_path(path);
- if (enable && !PluginGroup::IsPluginPathDisabledByPolicy(file_path))
- NPAPI::PluginList::Singleton()->EnablePlugin(file_path);
+ if (enable &&
+ !webkit::npapi::PluginGroup::IsPluginPathDisabledByPolicy(file_path))
+ webkit::npapi::PluginList::Singleton()->EnablePlugin(file_path);
else
- NPAPI::PluginList::Singleton()->DisablePlugin(file_path);
+ webkit::npapi::PluginList::Singleton()->DisablePlugin(file_path);
NotifyPluginStatusChanged();
}
@@ -105,7 +107,8 @@ void PluginUpdater::DisablePluginsFromPolicy(const ListValue* plugin_names) {
}
}
}
- PluginGroup::SetPolicyDisabledPluginPatterns(policy_disabled_plugin_patterns);
+ webkit::npapi::PluginGroup::SetPolicyDisabledPluginPatterns(
+ policy_disabled_plugin_patterns);
NotifyPluginStatusChanged();
}
@@ -190,7 +193,7 @@ void PluginUpdater::DisablePluginGroupsFromPrefs(Profile* profile) {
}
}
if (!enabled)
- NPAPI::PluginList::Singleton()->DisablePlugin(plugin_path);
+ webkit::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.
@@ -213,13 +216,14 @@ 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.
- NPAPI::PluginList::Singleton()->DisablePlugin(pdf_path);
+ webkit::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(PluginGroup::kAdobeReaderGroupName));
+ EnablePluginGroup(false, ASCIIToUTF16(
+ webkit::npapi::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
@@ -237,11 +241,11 @@ void PluginUpdater::UpdatePreferences(Profile* profile, int delay_ms) {
}
void PluginUpdater::GetPreferencesDataOnFileThread(void* profile) {
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
- std::vector<PluginGroup> groups;
- NPAPI::PluginList::Singleton()->GetPluginGroups(false, &groups);
+ std::vector<webkit::npapi::PluginGroup> groups;
+ webkit::npapi::PluginList::Singleton()->GetPluginGroups(false, &groups);
BrowserThread::PostTask(
BrowserThread::UI,
@@ -253,8 +257,8 @@ void PluginUpdater::GetPreferencesDataOnFileThread(void* profile) {
void PluginUpdater::OnUpdatePreferences(
Profile* profile,
- const std::vector<WebPluginInfo>& plugins,
- const std::vector<PluginGroup>& groups) {
+ const std::vector<webkit::npapi::WebPluginInfo>& plugins,
+ const std::vector<webkit::npapi::PluginGroup>& groups) {
ListValue* plugins_list = profile->GetPrefs()->GetMutableList(
prefs::kPluginsPluginsList);
plugins_list->Clear();
@@ -265,7 +269,8 @@ void PluginUpdater::OnUpdatePreferences(
internal_dir);
// Add the plugin files.
- for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin();
+ for (std::vector<webkit::npapi::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 5264334..dc18595 100644
--- a/chrome/browser/plugin_updater.h
+++ b/chrome/browser/plugin_updater.h
@@ -12,15 +12,19 @@
#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 PluginGroup;
class Profile;
+
+namespace webkit {
+namespace npapi {
+class PluginGroup;
struct WebPluginInfo;
+}
+}
class PluginUpdater : public NotificationObserver {
public:
@@ -58,8 +62,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<WebPluginInfo>& plugins,
- const std::vector<PluginGroup>& groups);
+ const std::vector<webkit::npapi::WebPluginInfo>& plugins,
+ const std::vector<webkit::npapi::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.
@@ -68,7 +72,8 @@ class PluginUpdater : public NotificationObserver {
// Used for the post task to notify that plugin enabled status changed.
static void OnNotifyPluginStatusChanged();
- static DictionaryValue* CreatePluginFileSummary(const WebPluginInfo& plugin);
+ static DictionaryValue* CreatePluginFileSummary(
+ const webkit::npapi::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 1a7c07c..f379931 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/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/webplugin.h"
AcceleratedSurfaceContainerMac::AcceleratedSurfaceContainerMac(
AcceleratedSurfaceContainerManagerMac* manager,
@@ -51,7 +51,7 @@ void AcceleratedSurfaceContainerMac::SetSizeAndTransportDIB(
}
void AcceleratedSurfaceContainerMac::SetGeometry(
- const webkit_glue::WebPluginGeometry& geom) {
+ const webkit::npapi::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 deda9ef..45979e0 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_mac.h
+++ b/chrome/browser/renderer_host/accelerated_surface_container_mac.h
@@ -36,9 +36,11 @@
#include "gfx/native_widget_types.h"
#include "gfx/rect.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
struct WebPluginGeometry;
}
+}
class AcceleratedSurfaceContainerManagerMac;
@@ -65,7 +67,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_glue::WebPluginGeometry& geom);
+ void SetGeometry(const webkit::npapi::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 1ad09ba..a96782b 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/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/webplugin.h"
AcceleratedSurfaceContainerManagerMac::AcceleratedSurfaceContainerManagerMac()
: current_id_(0),
@@ -86,7 +86,7 @@ void AcceleratedSurfaceContainerManagerMac::SetSizeAndTransportDIB(
}
void AcceleratedSurfaceContainerManagerMac::SetPluginContainerGeometry(
- const webkit_glue::WebPluginGeometry& move) {
+ const webkit::npapi::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 a03a5c4..a2855a4 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
+++ b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
@@ -14,9 +14,11 @@
#include "base/lock.h"
#include "gfx/native_widget_types.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
struct WebPluginGeometry;
}
+}
class AcceleratedSurfaceContainerMac;
@@ -63,7 +65,8 @@ class AcceleratedSurfaceContainerManagerMac {
// Takes an update from WebKit about a plugin's position and size and moves
// the plugin accordingly.
- void SetPluginContainerGeometry(const webkit_glue::WebPluginGeometry& move);
+ void SetPluginContainerGeometry(
+ const webkit::npapi::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 82ca861..bc35c42 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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -422,18 +422,18 @@ bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) {
return false;
if (need_plugin_list) {
- if (!NPAPI::PluginList::Singleton()->PluginsLoaded()) {
+ if (!webkit::npapi::PluginList::Singleton()->PluginsLoaded()) {
*need_plugin_list = true;
return true;
}
} else {
- DCHECK(NPAPI::PluginList::Singleton()->PluginsLoaded());
+ DCHECK(webkit::npapi::PluginList::Singleton()->PluginsLoaded());
}
// Finally, check the plugin list.
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
bool allow_wildcard = false;
- return !NPAPI::PluginList::Singleton()->GetPluginInfo(
+ return !webkit::npapi::PluginList::Singleton()->GetPluginInfo(
GURL(), type, allow_wildcard, &info, NULL) || !info.enabled;
}
@@ -469,8 +469,8 @@ void BufferedResourceHandler::UseAlternateResourceHandler(
}
void BufferedResourceHandler::LoadPlugins() {
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::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 ad49440..453e5c5 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 WebPluginInfo& info) {
+ virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) {
info_ = info;
}
@@ -223,7 +223,7 @@ class OpenChannelToPluginCallback : public PluginProcessHost::Client {
scoped_refptr<RenderMessageFilter> filter_;
IPC::Message* reply_msg_;
- WebPluginInfo info_;
+ webkit::npapi::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<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetEnabledPlugins(refresh, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::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;
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
bool found = plugin_service_->GetFirstAllowedPluginInfo(url,
mime_type,
&info,
@@ -723,18 +723,20 @@ void RenderMessageFilter::OnGetPluginInfoOnFileThread(
found, info, actual_mime_type, policy_url, reply_msg));
}
-void RenderMessageFilter::OnGotPluginInfo(bool found,
- const WebPluginInfo& info,
- const std::string& actual_mime_type,
- const GURL& policy_url,
- IPC::Message* 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) {
ContentSetting setting = CONTENT_SETTING_DEFAULT;
- WebPluginInfo info_copy = info;
+ webkit::npapi::WebPluginInfo info_copy = info;
if (found) {
info_copy.enabled = info_copy.enabled &&
plugin_service_->PrivatePluginAllowedForURL(info_copy.path, policy_url);
std::string resource =
- NPAPI::PluginList::Singleton()->GetPluginGroupIdentifier(info_copy);
+ webkit::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 9a8a745..5c988b8 100644
--- a/chrome/browser/renderer_host/render_message_filter.h
+++ b/chrome/browser/renderer_host/render_message_filter.h
@@ -41,7 +41,12 @@ class RenderWidgetHelper;
class URLRequestContextGetter;
struct ViewHostMsg_CreateWindow_Params;
struct ViewHostMsg_CreateWorker_Params;
+
+namespace webkit {
+namespace npapi {
struct WebPluginInfo;
+}
+}
namespace base {
class SharedMemory;
@@ -153,7 +158,7 @@ class RenderMessageFilter : public BrowserMessageFilter,
const std::string& mime_type,
IPC::Message* reply_msg);
void OnGotPluginInfo(bool found,
- const WebPluginInfo& info,
+ const webkit::npapi::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 3c71440b..b4bb0e2 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 fdbe440..2d4b1ea 100644
--- a/chrome/browser/renderer_host/render_widget_host_view.h
+++ b/chrome/browser/renderer_host/render_widget_host_view.h
@@ -39,8 +39,13 @@ 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
@@ -97,7 +102,7 @@ class RenderWidgetHostView {
// Moves all plugin windows as described in the given list.
virtual void MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves) = 0;
+ const std::vector<webkit::npapi::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 e90e096..b091890ef 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_glue::WebPluginGeometry>& moves) {
+ const std::vector<webkit::npapi::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 9f9b2e2..2c47c01 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_glue::WebPluginGeometry>& moves);
+ const std::vector<webkit::npapi::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.
- GtkPluginContainerManager plugin_container_manager_;
+ webkit::npapi::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 46efeee..d538758 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_glue::WebPluginGeometry>& moves);
+ const std::vector<webkit::npapi::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 22175dc..60cc85e 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_glue::WebPluginGeometry>& moves) {
+ const std::vector<webkit::npapi::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_glue::WebPluginGeometry>::const_iterator iter =
+ for (std::vector<webkit::npapi::WebPluginGeometry>::const_iterator iter =
moves.begin();
iter != moves.end();
++iter) {
- webkit_glue::WebPluginGeometry geom = *iter;
+ webkit::npapi::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_glue::WebPluginGeometry geom;
+ webkit::npapi::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_glue::WebPluginGeometry>(1, geom));
+ MovePluginWindows(std::vector<webkit::npapi::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 521e48d..a36c88f 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_glue::WebPluginGeometry geom;
+ webkit::npapi::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_glue::WebPluginGeometry>(1, geom));
+ std::vector<webkit::npapi::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 cb17689..c48a1a9 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_glue::WebPluginGeometry>& moves) {
+ const std::vector<webkit::npapi::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 9c5c8cb..8a582a7 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_glue::WebPluginGeometry>& moves);
+ const std::vector<webkit::npapi::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 f5afe70..6a86bc0 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_glue::WebPluginGeometry;
+using webkit::npapi::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 (WebPluginDelegateImpl::IsPluginDelegateWindow(window) &&
+ if (webkit::npapi::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 = kWrapperNativeWindowClassName;
+ wcex.lpszClassName = webkit::npapi::kWrapperNativeWindowClassName;
wcex.hIconSm = 0;
window_class = RegisterClassEx(&wcex);
}
@@ -654,11 +654,11 @@ void RenderWidgetHostViewWin::ImeCancelComposition() {
}
BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lparam) {
- if (!WebPluginDelegateImpl::IsPluginDelegateWindow(hwnd))
+ if (!webkit::npapi::WebPluginDelegateImpl::IsPluginDelegateWindow(hwnd))
return TRUE;
gfx::Rect* rect = reinterpret_cast<gfx::Rect*>(lparam);
- static UINT msg = RegisterWindowMessage(kPaintMessageName);
+ static UINT msg = RegisterWindowMessage(webkit::npapi::kPaintMessageName);
WPARAM wparam = rect->x() << 16 | rect->y();
lparam = rect->width() << 16 | rect->height();
@@ -1447,7 +1447,8 @@ 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) == kWrapperNativeWindowClassName)
+ if (win_util::GetClassName(child_window) ==
+ webkit::npapi::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 1f67814..50e59a6 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_glue::WebPluginGeometry>& moves);
+ const std::vector<webkit::npapi::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 7aa9638..f84bc21 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_glue::WebPluginGeometry>& moves) {}
+ const std::vector<webkit::npapi::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 46498e3..8f5ed48 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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/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();
- WebPluginInfo plugin_info;
- if (NPAPI::PluginList::Singleton()->GetPluginInfoByPath(
+ webkit::npapi::WebPluginInfo plugin_info;
+ if (webkit::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 051d58b..746d8a1 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/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
class TableModelArrayControllerTest : public CocoaTest {
public:
@@ -50,27 +50,27 @@ class TableModelArrayControllerTest : public CocoaTest {
model_.reset(new MockPluginExceptionsTableModel(map, NULL));
- std::vector<PluginGroup> plugins;
- WebPluginInfo foo_plugin;
+ std::vector<webkit::npapi::PluginGroup> plugins;
+ webkit::npapi::WebPluginInfo foo_plugin;
foo_plugin.path = FilePath(FILE_PATH_LITERAL("a-foo"));
foo_plugin.name = ASCIIToUTF16("FooPlugin");
foo_plugin.enabled = true;
- scoped_ptr<PluginGroup> foo_group(
- PluginGroup::FromWebPluginInfo(foo_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> foo_group(
+ webkit::npapi::PluginGroup::FromWebPluginInfo(foo_plugin));
plugins.push_back(*foo_group);
- WebPluginInfo bar_plugin;
+ webkit::npapi::WebPluginInfo bar_plugin;
bar_plugin.path = FilePath(FILE_PATH_LITERAL("b-bar"));
bar_plugin.name = ASCIIToUTF16("BarPlugin");
bar_plugin.enabled = true;
- scoped_ptr<PluginGroup> bar_group(
- PluginGroup::FromWebPluginInfo(bar_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> bar_group(
+ webkit::npapi::PluginGroup::FromWebPluginInfo(bar_plugin));
plugins.push_back(*bar_group);
- WebPluginInfo blurp_plugin;
+ webkit::npapi::WebPluginInfo blurp_plugin;
blurp_plugin.path = FilePath(FILE_PATH_LITERAL("c-blurp"));
blurp_plugin.name = ASCIIToUTF16("BlurpPlugin");
blurp_plugin.enabled = true;
- scoped_ptr<PluginGroup> blurp_group(
- PluginGroup::FromWebPluginInfo(blurp_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> blurp_group(
+ webkit::npapi::PluginGroup::FromWebPluginInfo(blurp_plugin));
plugins.push_back(*blurp_group);
model_->set_plugins(plugins);