summaryrefslogtreecommitdiffstats
path: root/content/browser
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser')
-rw-r--r--content/browser/loader/buffered_resource_handler.cc6
-rw-r--r--content/browser/loader/buffered_resource_handler.h7
-rw-r--r--content/browser/plugin_data_remover_impl.cc12
-rw-r--r--content/browser/plugin_loader_posix.cc5
-rw-r--r--content/browser/plugin_loader_posix.h8
-rw-r--r--content/browser/plugin_loader_posix_unittest.cc30
-rw-r--r--content/browser/plugin_process_host.cc2
-rw-r--r--content/browser/plugin_process_host.h10
-rw-r--r--content/browser/plugin_service_impl.cc40
-rw-r--r--content/browser/plugin_service_impl.h12
-rw-r--r--content/browser/plugin_service_impl_browsertest.cc8
-rw-r--r--content/browser/renderer_host/render_message_filter.cc14
-rw-r--r--content/browser/renderer_host/render_message_filter.h9
13 files changed, 75 insertions, 88 deletions
diff --git a/content/browser/loader/buffered_resource_handler.cc b/content/browser/loader/buffered_resource_handler.cc
index c31fd80..a3afb3f 100644
--- a/content/browser/loader/buffered_resource_handler.cc
+++ b/content/browser/loader/buffered_resource_handler.cc
@@ -23,13 +23,13 @@
#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_dispatcher_host_delegate.h"
#include "content/public/common/resource_response.h"
+#include "content/public/common/webplugininfo.h"
#include "net/base/io_buffer.h"
#include "net/base/mime_sniffer.h"
#include "net/base/mime_util.h"
#include "net/base/net_errors.h"
#include "net/http/http_content_disposition.h"
#include "net/http/http_response_headers.h"
-#include "webkit/plugins/webplugininfo.h"
namespace content {
@@ -439,7 +439,7 @@ bool BufferedResourceHandler::HasSupportingPlugin(bool* stale) {
ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request_);
bool allow_wildcard = false;
- webkit::WebPluginInfo plugin;
+ WebPluginInfo plugin;
return PluginServiceImpl::GetInstance()->GetPluginInfo(
info->GetChildID(), info->GetRouteID(), info->GetContext(),
request_->url(), GURL(), response_->head.mime_type, allow_wildcard,
@@ -461,7 +461,7 @@ bool BufferedResourceHandler::CopyReadBufferToNextHandler(int request_id) {
}
void BufferedResourceHandler::OnPluginsLoaded(
- const std::vector<webkit::WebPluginInfo>& plugins) {
+ const std::vector<WebPluginInfo>& plugins) {
bool defer = false;
if (!ProcessResponse(&defer)) {
controller()->Cancel();
diff --git a/content/browser/loader/buffered_resource_handler.h b/content/browser/loader/buffered_resource_handler.h
index ee70a3d..c1a7a6e 100644
--- a/content/browser/loader/buffered_resource_handler.h
+++ b/content/browser/loader/buffered_resource_handler.h
@@ -16,12 +16,9 @@ namespace net {
class URLRequest;
}
-namespace webkit {
-struct WebPluginInfo;
-}
-
namespace content {
class ResourceDispatcherHostImpl;
+struct WebPluginInfo;
// Used to buffer a request until enough data has been received.
class BufferedResourceHandler
@@ -72,7 +69,7 @@ class BufferedResourceHandler
bool CopyReadBufferToNextHandler(int request_id);
// Called on the IO thread once the list of plugins has been loaded.
- void OnPluginsLoaded(const std::vector<webkit::WebPluginInfo>& plugins);
+ void OnPluginsLoaded(const std::vector<WebPluginInfo>& plugins);
enum State {
STATE_STARTING,
diff --git a/content/browser/plugin_data_remover_impl.cc b/content/browser/plugin_data_remover_impl.cc
index 45b799b..d711f80 100644
--- a/content/browser/plugin_data_remover_impl.cc
+++ b/content/browser/plugin_data_remover_impl.cc
@@ -41,16 +41,16 @@ PluginDataRemover* PluginDataRemover::Create(BrowserContext* browser_context) {
// static
void PluginDataRemover::GetSupportedPlugins(
- std::vector<webkit::WebPluginInfo>* supported_plugins) {
+ std::vector<WebPluginInfo>* supported_plugins) {
bool allow_wildcard = false;
- std::vector<webkit::WebPluginInfo> plugins;
+ std::vector<WebPluginInfo> plugins;
PluginService::GetInstance()->GetPluginInfoArray(
GURL(), kFlashPluginSwfMimeType, allow_wildcard, &plugins, NULL);
Version min_version(kMinFlashVersion);
- for (std::vector<webkit::WebPluginInfo>::iterator it = plugins.begin();
+ for (std::vector<WebPluginInfo>::iterator it = plugins.begin();
it != plugins.end(); ++it) {
Version version;
- webkit::WebPluginInfo::CreateVersionFromString(it->version, &version);
+ WebPluginInfo::CreateVersionFromString(it->version, &version);
if (version.IsValid() && min_version.CompareTo(version) == -1)
supported_plugins->push_back(*it);
}
@@ -88,7 +88,7 @@ class PluginDataRemoverImpl::Context
PluginServiceImpl* plugin_service = PluginServiceImpl::GetInstance();
// Get the plugin file path.
- std::vector<webkit::WebPluginInfo> plugins;
+ std::vector<WebPluginInfo> plugins;
plugin_service->GetPluginInfoArray(
GURL(), mime_type, false, &plugins, NULL);
base::FilePath plugin_path;
@@ -135,7 +135,7 @@ class PluginDataRemoverImpl::Context
return resource_context_;
}
- virtual void SetPluginInfo(const webkit::WebPluginInfo& info) OVERRIDE {}
+ virtual void SetPluginInfo(const WebPluginInfo& info) OVERRIDE {}
virtual void OnFoundPluginProcessHost(PluginProcessHost* host) OVERRIDE {}
diff --git a/content/browser/plugin_loader_posix.cc b/content/browser/plugin_loader_posix.cc
index 7aa2b89..e6bc3ea 100644
--- a/content/browser/plugin_loader_posix.cc
+++ b/content/browser/plugin_loader_posix.cc
@@ -116,7 +116,7 @@ void PluginLoaderPosix::LoadPluginsInternal() {
}
void PluginLoaderPosix::OnPluginLoaded(uint32 index,
- const webkit::WebPluginInfo& plugin) {
+ const WebPluginInfo& plugin) {
if (index != next_load_index_) {
LOG(ERROR) << "Received unexpected plugin load message for "
<< plugin.path.value() << "; index=" << index;
@@ -147,8 +147,7 @@ void PluginLoaderPosix::OnPluginLoadFailed(uint32 index,
bool PluginLoaderPosix::MaybeAddInternalPlugin(
const base::FilePath& plugin_path) {
- for (std::vector<webkit::WebPluginInfo>::iterator it =
- internal_plugins_.begin();
+ for (std::vector<WebPluginInfo>::iterator it = internal_plugins_.begin();
it != internal_plugins_.end();
++it) {
if (it->path == plugin_path) {
diff --git a/content/browser/plugin_loader_posix.h b/content/browser/plugin_loader_posix.h
index 12bec96..60cd5c6 100644
--- a/content/browser/plugin_loader_posix.h
+++ b/content/browser/plugin_loader_posix.h
@@ -14,8 +14,8 @@
#include "base/time/time.h"
#include "content/browser/plugin_service_impl.h"
#include "content/public/browser/utility_process_host_client.h"
+#include "content/public/common/webplugininfo.h"
#include "ipc/ipc_sender.h"
-#include "webkit/plugins/webplugininfo.h"
namespace base {
class MessageLoopProxy;
@@ -82,7 +82,7 @@ class CONTENT_EXPORT PluginLoaderPosix
virtual void LoadPluginsInternal();
// Message handlers.
- void OnPluginLoaded(uint32 index, const webkit::WebPluginInfo& plugin);
+ void OnPluginLoaded(uint32 index, const WebPluginInfo& plugin);
void OnPluginLoadFailed(uint32 index, const base::FilePath& plugin_path);
// Checks if the plugin path is an internal plugin, and, if it is, adds it to
@@ -106,10 +106,10 @@ class CONTENT_EXPORT PluginLoaderPosix
size_t next_load_index_;
// Internal plugins that have been registered at the time of loading.
- std::vector<webkit::WebPluginInfo> internal_plugins_;
+ std::vector<WebPluginInfo> internal_plugins_;
// A vector of plugins that have been loaded successfully.
- std::vector<webkit::WebPluginInfo> loaded_plugins_;
+ std::vector<WebPluginInfo> loaded_plugins_;
// The callback and message loop on which the callback will be run when the
// plugin loading process has been completed.
diff --git a/content/browser/plugin_loader_posix_unittest.cc b/content/browser/plugin_loader_posix_unittest.cc
index 6defebb..8f90723 100644
--- a/content/browser/plugin_loader_posix_unittest.cc
+++ b/content/browser/plugin_loader_posix_unittest.cc
@@ -13,7 +13,6 @@
#include "content/browser/browser_thread_impl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/plugins/webplugininfo.h"
namespace content {
@@ -33,11 +32,11 @@ class MockPluginLoaderPosix : public PluginLoaderPosix {
return next_load_index_;
}
- const std::vector<webkit::WebPluginInfo>& loaded_plugins() {
+ const std::vector<WebPluginInfo>& loaded_plugins() {
return loaded_plugins_;
}
- std::vector<webkit::WebPluginInfo>* internal_plugins() {
+ std::vector<WebPluginInfo>* internal_plugins() {
return &internal_plugins_;
}
@@ -45,7 +44,7 @@ class MockPluginLoaderPosix : public PluginLoaderPosix {
PluginLoaderPosix::LoadPluginsInternal();
}
- void TestOnPluginLoaded(uint32 index, const webkit::WebPluginInfo& plugin) {
+ void TestOnPluginLoaded(uint32 index, const WebPluginInfo& plugin) {
OnPluginLoaded(index, plugin);
}
@@ -57,7 +56,7 @@ class MockPluginLoaderPosix : public PluginLoaderPosix {
virtual ~MockPluginLoaderPosix() {}
};
-void VerifyCallback(int* run_count, const std::vector<webkit::WebPluginInfo>&) {
+void VerifyCallback(int* run_count, const std::vector<WebPluginInfo>&) {
++(*run_count);
}
@@ -90,9 +89,9 @@ class PluginLoaderPosixTest : public testing::Test {
}
// Data used for testing.
- webkit::WebPluginInfo plugin1_;
- webkit::WebPluginInfo plugin2_;
- webkit::WebPluginInfo plugin3_;
+ WebPluginInfo plugin1_;
+ WebPluginInfo plugin2_;
+ WebPluginInfo plugin3_;
private:
base::ShadowingAtExitManager at_exit_manager_; // Destroys PluginService.
@@ -152,8 +151,7 @@ TEST_F(PluginLoaderPosixTest, ThreeSuccessfulLoads) {
EXPECT_EQ(0u, plugin_loader()->next_load_index());
- const std::vector<webkit::WebPluginInfo>& plugins(
- plugin_loader()->loaded_plugins());
+ const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins());
plugin_loader()->TestOnPluginLoaded(0, plugin1_);
EXPECT_EQ(1u, plugin_loader()->next_load_index());
@@ -193,8 +191,7 @@ TEST_F(PluginLoaderPosixTest, ThreeSuccessfulLoadsThenCrash) {
EXPECT_EQ(0u, plugin_loader()->next_load_index());
- const std::vector<webkit::WebPluginInfo>& plugins(
- plugin_loader()->loaded_plugins());
+ const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins());
plugin_loader()->TestOnPluginLoaded(0, plugin1_);
EXPECT_EQ(1u, plugin_loader()->next_load_index());
@@ -236,8 +233,7 @@ TEST_F(PluginLoaderPosixTest, TwoFailures) {
EXPECT_EQ(0u, plugin_loader()->next_load_index());
- const std::vector<webkit::WebPluginInfo>& plugins(
- plugin_loader()->loaded_plugins());
+ const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins());
plugin_loader()->TestOnPluginLoadFailed(0, plugin1_.path);
EXPECT_EQ(1u, plugin_loader()->next_load_index());
@@ -275,8 +271,7 @@ TEST_F(PluginLoaderPosixTest, CrashedProcess) {
EXPECT_EQ(0u, plugin_loader()->next_load_index());
- const std::vector<webkit::WebPluginInfo>& plugins(
- plugin_loader()->loaded_plugins());
+ const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins());
plugin_loader()->TestOnPluginLoaded(0, plugin1_);
EXPECT_EQ(1u, plugin_loader()->next_load_index());
@@ -313,8 +308,7 @@ TEST_F(PluginLoaderPosixTest, InternalPlugin) {
EXPECT_EQ(0u, plugin_loader()->next_load_index());
- const std::vector<webkit::WebPluginInfo>& plugins(
- plugin_loader()->loaded_plugins());
+ const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins());
plugin_loader()->TestOnPluginLoaded(0, plugin1_);
EXPECT_EQ(1u, plugin_loader()->next_load_index());
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc
index fcde1ff..bffd16e 100644
--- a/content/browser/plugin_process_host.cc
+++ b/content/browser/plugin_process_host.cc
@@ -145,7 +145,7 @@ bool PluginProcessHost::Send(IPC::Message* message) {
return process_->Send(message);
}
-bool PluginProcessHost::Init(const webkit::WebPluginInfo& info) {
+bool PluginProcessHost::Init(const WebPluginInfo& info) {
info_ = info;
process_->SetName(info_.name);
diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h
index 63696ef..61ce44d 100644
--- a/content/browser/plugin_process_host.h
+++ b/content/browser/plugin_process_host.h
@@ -19,8 +19,8 @@
#include "content/public/browser/browser_child_process_host_delegate.h"
#include "content/public/browser/browser_child_process_host_iterator.h"
#include "content/public/common/process_type.h"
+#include "content/public/common/webplugininfo.h"
#include "ipc/ipc_channel_proxy.h"
-#include "webkit/plugins/webplugininfo.h"
#include "ui/gfx/native_widget_types.h"
namespace gfx {
@@ -54,7 +54,7 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate,
// Returns the resource context for the renderer requesting the channel.
virtual ResourceContext* GetResourceContext() = 0;
virtual bool OffTheRecord() = 0;
- virtual void SetPluginInfo(const webkit::WebPluginInfo& info) = 0;
+ virtual void SetPluginInfo(const WebPluginInfo& info) = 0;
virtual void OnFoundPluginProcessHost(PluginProcessHost* host) = 0;
virtual void OnSentPluginChannelRequest() = 0;
// The client should delete itself when one of these methods is called.
@@ -73,7 +73,7 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate,
// Initialize the new plugin process, returning true on success. This must
// be called before the object can be used.
- bool Init(const webkit::WebPluginInfo& info);
+ bool Init(const WebPluginInfo& info);
// Force the plugin process to shutdown (cleanly).
void ForceShutdown();
@@ -108,7 +108,7 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate,
void OnAppActivation();
#endif
- const webkit::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.
@@ -157,7 +157,7 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate,
std::list<Client*> sent_requests_;
// Information about the plugin.
- webkit::WebPluginInfo info_;
+ WebPluginInfo info_;
#if defined(OS_WIN)
// Tracks plugin parent windows created on the UI thread.
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index 5ebfe20..64efebc 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -28,8 +28,8 @@
#include "content/public/browser/resource_context.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/process_type.h"
+#include "content/public/common/webplugininfo.h"
#include "webkit/plugins/plugin_constants.h"
-#include "webkit/plugins/webplugininfo.h"
#if defined(OS_WIN)
#include "content/common/plugin_constants_win.h"
@@ -176,13 +176,13 @@ void PluginServiceImpl::Init() {
// type we use with the plugin, so the renderer can instantiate it.
const CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kSitePerProcess)) {
- webkit::WebPluginInfo webview_plugin(
+ WebPluginInfo webview_plugin(
ASCIIToUTF16("WebView Tag"),
base::FilePath(),
ASCIIToUTF16("1.2.3.4"),
ASCIIToUTF16("Browser Plugin."));
- webview_plugin.type = webkit::WebPluginInfo::PLUGIN_TYPE_NPAPI;
- webkit::WebPluginMimeType webview_plugin_mime_type;
+ webview_plugin.type = WebPluginInfo::PLUGIN_TYPE_NPAPI;
+ WebPluginMimeType webview_plugin_mime_type;
webview_plugin_mime_type.mime_type = "application/browser-plugin";
webview_plugin_mime_type.file_extensions.push_back("*");
webview_plugin.mime_types.push_back(webview_plugin_mime_type);
@@ -302,7 +302,7 @@ PluginProcessHost* PluginServiceImpl::FindOrStartNpapiPluginProcess(
if (plugin_host)
return plugin_host;
- webkit::WebPluginInfo info;
+ WebPluginInfo info;
if (!GetPluginInfoByPath(plugin_path, &info)) {
return NULL;
}
@@ -448,7 +448,7 @@ void PluginServiceImpl::ForwardGetAllowedPluginForOpenChannelToPlugin(
const GURL& url,
const std::string& mime_type,
PluginProcessHost::Client* client,
- const std::vector<webkit::WebPluginInfo>&) {
+ const std::vector<WebPluginInfo>&) {
GetAllowedPluginForOpenChannelToPlugin(params.render_process_id,
params.render_view_id, url, params.page_url, mime_type, client,
params.resource_context);
@@ -462,7 +462,7 @@ void PluginServiceImpl::GetAllowedPluginForOpenChannelToPlugin(
const std::string& mime_type,
PluginProcessHost::Client* client,
ResourceContext* resource_context) {
- webkit::WebPluginInfo info;
+ WebPluginInfo info;
bool allow_wildcard = true;
bool found = GetPluginInfo(
render_process_id, render_view_id, resource_context,
@@ -507,7 +507,7 @@ bool PluginServiceImpl::GetPluginInfoArray(
const GURL& url,
const std::string& mime_type,
bool allow_wildcard,
- std::vector<webkit::WebPluginInfo>* plugins,
+ std::vector<WebPluginInfo>* plugins,
std::vector<std::string>* actual_mime_types) {
bool use_stale = false;
PluginList::Singleton()->GetPluginInfoArray(
@@ -524,9 +524,9 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
const std::string& mime_type,
bool allow_wildcard,
bool* is_stale,
- webkit::WebPluginInfo* info,
+ WebPluginInfo* info,
std::string* actual_mime_type) {
- std::vector<webkit::WebPluginInfo> plugins;
+ std::vector<WebPluginInfo> plugins;
std::vector<std::string> mime_types;
bool stale = GetPluginInfoArray(
url, mime_type, allow_wildcard, &plugins, &mime_types);
@@ -550,11 +550,11 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id,
}
bool PluginServiceImpl::GetPluginInfoByPath(const base::FilePath& plugin_path,
- webkit::WebPluginInfo* info) {
- std::vector<webkit::WebPluginInfo> plugins;
+ WebPluginInfo* info) {
+ std::vector<WebPluginInfo> plugins;
PluginList::Singleton()->GetPluginsNoRefresh(&plugins);
- for (std::vector<webkit::WebPluginInfo>::iterator it = plugins.begin();
+ for (std::vector<WebPluginInfo>::iterator it = plugins.begin();
it != plugins.end();
++it) {
if (it->path == plugin_path) {
@@ -569,7 +569,7 @@ bool PluginServiceImpl::GetPluginInfoByPath(const base::FilePath& plugin_path,
string16 PluginServiceImpl::GetPluginDisplayNameByPath(
const base::FilePath& path) {
string16 plugin_name = path.LossyDisplayName();
- webkit::WebPluginInfo info;
+ WebPluginInfo info;
if (PluginService::GetInstance()->GetPluginInfoByPath(path, &info) &&
!info.name.empty()) {
plugin_name = info.name;
@@ -600,7 +600,7 @@ void PluginServiceImpl::GetPlugins(const GetPluginsCallback& callback) {
return;
}
#if defined(OS_POSIX)
- std::vector<webkit::WebPluginInfo> cached_plugins;
+ std::vector<WebPluginInfo> cached_plugins;
if (PluginList::Singleton()->GetPluginsNoRefresh(&cached_plugins)) {
// Can't assume the caller is reentrant.
target_loop->PostTask(FROM_HERE,
@@ -625,7 +625,7 @@ void PluginServiceImpl::GetPluginsInternal(
DCHECK(BrowserThread::GetBlockingPool()->IsRunningSequenceOnCurrentThread(
plugin_list_token_));
- std::vector<webkit::WebPluginInfo> plugins;
+ std::vector<WebPluginInfo> plugins;
PluginList::Singleton()->GetPlugins(&plugins, NPAPIPluginsSupported());
target_loop->PostTask(FROM_HERE,
@@ -674,7 +674,7 @@ PepperPluginInfo* PluginServiceImpl::GetRegisteredPpapiPluginInfo(
// can be obtained from the PluginList singleton and we can use it to
// construct it and add it to the list. This same deal needs to be done
// in the renderer side in PepperPluginRegistry.
- webkit::WebPluginInfo webplugin_info;
+ WebPluginInfo webplugin_info;
if (!GetPluginInfoByPath(plugin_path, &webplugin_info))
return NULL;
PepperPluginInfo new_pepper_info;
@@ -771,10 +771,10 @@ void PluginServiceImpl::AddExtraPluginDir(const base::FilePath& path) {
}
void PluginServiceImpl::RegisterInternalPlugin(
- const webkit::WebPluginInfo& info,
+ const WebPluginInfo& info,
bool add_at_beginning) {
if (!NPAPIPluginsSupported() &&
- info.type == webkit::WebPluginInfo::PLUGIN_TYPE_NPAPI) {
+ info.type == WebPluginInfo::PLUGIN_TYPE_NPAPI) {
DLOG(INFO) << "Don't register NPAPI plugins when they're not supported";
return;
}
@@ -786,7 +786,7 @@ void PluginServiceImpl::UnregisterInternalPlugin(const base::FilePath& path) {
}
void PluginServiceImpl::GetInternalPlugins(
- std::vector<webkit::WebPluginInfo>* plugins) {
+ std::vector<WebPluginInfo>* plugins) {
PluginList::Singleton()->GetInternalPlugins(plugins);
}
diff --git a/content/browser/plugin_service_impl.h b/content/browser/plugin_service_impl.h
index d88f3eb..d71cacc 100644
--- a/content/browser/plugin_service_impl.h
+++ b/content/browser/plugin_service_impl.h
@@ -76,7 +76,7 @@ class CONTENT_EXPORT PluginServiceImpl
const GURL& url,
const std::string& mime_type,
bool allow_wildcard,
- std::vector<webkit::WebPluginInfo>* info,
+ std::vector<WebPluginInfo>* info,
std::vector<std::string>* actual_mime_types) OVERRIDE;
virtual bool GetPluginInfo(int render_process_id,
int render_view_id,
@@ -86,10 +86,10 @@ class CONTENT_EXPORT PluginServiceImpl
const std::string& mime_type,
bool allow_wildcard,
bool* is_stale,
- webkit::WebPluginInfo* info,
+ WebPluginInfo* info,
std::string* actual_mime_type) OVERRIDE;
virtual bool GetPluginInfoByPath(const base::FilePath& plugin_path,
- webkit::WebPluginInfo* info) OVERRIDE;
+ WebPluginInfo* info) OVERRIDE;
virtual string16 GetPluginDisplayNameByPath(
const base::FilePath& path) OVERRIDE;
virtual void GetPlugins(const GetPluginsCallback& callback) OVERRIDE;
@@ -104,10 +104,10 @@ class CONTENT_EXPORT PluginServiceImpl
virtual void RemoveExtraPluginPath(const base::FilePath& path) OVERRIDE;
virtual void AddExtraPluginDir(const base::FilePath& path) OVERRIDE;
virtual void RegisterInternalPlugin(
- const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE;
+ const WebPluginInfo& info, bool add_at_beginning) OVERRIDE;
virtual void UnregisterInternalPlugin(const base::FilePath& path) OVERRIDE;
virtual void GetInternalPlugins(
- std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE;
+ std::vector<WebPluginInfo>* plugins) OVERRIDE;
virtual bool NPAPIPluginsSupported() OVERRIDE;
virtual void DisablePluginsDiscoveryForTesting() OVERRIDE;
#if defined(OS_MACOSX)
@@ -191,7 +191,7 @@ class CONTENT_EXPORT PluginServiceImpl
const GURL& url,
const std::string& mime_type,
PluginProcessHost::Client* client,
- const std::vector<webkit::WebPluginInfo>&);
+ const std::vector<WebPluginInfo>&);
// Helper so we can do the plugin lookup on the FILE thread.
void GetAllowedPluginForOpenChannelToPlugin(
int render_process_id,
diff --git a/content/browser/plugin_service_impl_browsertest.cc b/content/browser/plugin_service_impl_browsertest.cc
index 0f61e2f..1abf725 100644
--- a/content/browser/plugin_service_impl_browsertest.cc
+++ b/content/browser/plugin_service_impl_browsertest.cc
@@ -64,7 +64,7 @@ class MockPluginProcessHostClient : public PluginProcessHost::Client,
ASSERT_TRUE(channel_->Connect());
}
- virtual void SetPluginInfo(const webkit::WebPluginInfo& info) OVERRIDE {
+ virtual void SetPluginInfo(const WebPluginInfo& info) OVERRIDE {
ASSERT_TRUE(info.mime_types.size());
ASSERT_EQ(kNPAPITestPluginMimeType, info.mime_types[0].mime_type);
set_plugin_info_called_ = true;
@@ -125,7 +125,7 @@ class MockPluginServiceFilter : public content::PluginServiceFilter {
const void* context,
const GURL& url,
const GURL& policy_url,
- webkit::WebPluginInfo* plugin) OVERRIDE { return true; }
+ WebPluginInfo* plugin) OVERRIDE { return true; }
virtual bool CanLoadPlugin(
int render_process_id,
@@ -201,7 +201,7 @@ class MockCanceledPluginServiceClient : public PluginProcessHost::Client {
MOCK_METHOD1(OnFoundPluginProcessHost, void(PluginProcessHost* host));
MOCK_METHOD0(OnSentPluginChannelRequest, void());
MOCK_METHOD1(OnChannelOpened, void(const IPC::ChannelHandle& handle));
- MOCK_METHOD1(SetPluginInfo, void(const webkit::WebPluginInfo& info));
+ MOCK_METHOD1(SetPluginInfo, void(const WebPluginInfo& info));
MOCK_METHOD0(OnError, void());
bool get_resource_context_called() const {
@@ -257,7 +257,7 @@ class MockCanceledBeforeSentPluginProcessHostClient
virtual ~MockCanceledBeforeSentPluginProcessHostClient() {}
// Client implementation.
- virtual void SetPluginInfo(const webkit::WebPluginInfo& info) OVERRIDE {
+ virtual void SetPluginInfo(const WebPluginInfo& info) OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
ASSERT_TRUE(info.mime_types.size());
ASSERT_EQ(kNPAPITestPluginMimeType, info.mime_types[0].mime_type);
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index c8882c9..5f71dac 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -46,6 +46,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/context_menu_params.h"
#include "content/public/common/url_constants.h"
+#include "content/public/common/webplugininfo.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_platform_file.h"
#include "media/audio/audio_manager.h"
@@ -64,7 +65,6 @@
#include "third_party/WebKit/public/web/WebNotificationPresenter.h"
#include "ui/gfx/color_profile.h"
#include "webkit/plugins/plugin_constants.h"
-#include "webkit/plugins/webplugininfo.h"
#if defined(OS_MACOSX)
#include "content/common/mac/font_descriptor.h"
@@ -242,7 +242,7 @@ class RenderMessageFilter::OpenChannelToNpapiPluginCallback
return false;
}
- virtual void SetPluginInfo(const webkit::WebPluginInfo& info) OVERRIDE {
+ virtual void SetPluginInfo(const WebPluginInfo& info) OVERRIDE {
info_ = info;
}
@@ -284,7 +284,7 @@ class RenderMessageFilter::OpenChannelToNpapiPluginCallback
}
ResourceContext* context_;
- webkit::WebPluginInfo info_;
+ WebPluginInfo info_;
PluginProcessHost* host_;
bool sent_plugin_channel_request_;
};
@@ -667,16 +667,16 @@ void RenderMessageFilter::OnGetPlugins(
void RenderMessageFilter::GetPluginsCallback(
IPC::Message* reply_msg,
- const std::vector<webkit::WebPluginInfo>& all_plugins) {
+ const std::vector<WebPluginInfo>& all_plugins) {
// Filter the plugin list.
PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter();
- std::vector<webkit::WebPluginInfo> plugins;
+ std::vector<WebPluginInfo> plugins;
int child_process_id = -1;
int routing_id = MSG_ROUTING_NONE;
for (size_t i = 0; i < all_plugins.size(); ++i) {
// Copy because the filter can mutate.
- webkit::WebPluginInfo plugin(all_plugins[i]);
+ WebPluginInfo plugin(all_plugins[i]);
if (!filter || filter->IsPluginAvailable(child_process_id,
routing_id,
resource_context_,
@@ -697,7 +697,7 @@ void RenderMessageFilter::OnGetPluginInfo(
const GURL& page_url,
const std::string& mime_type,
bool* found,
- webkit::WebPluginInfo* info,
+ WebPluginInfo* info,
std::string* actual_mime_type) {
bool allow_wildcard = true;
*found = plugin_service_->GetPluginInfo(
diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h
index f94ae0f..f726244 100644
--- a/content/browser/renderer_host/render_message_filter.h
+++ b/content/browser/renderer_host/render_message_filter.h
@@ -64,10 +64,6 @@ class URLRequestContext;
class URLRequestContextGetter;
}
-namespace webkit {
-struct WebPluginInfo;
-}
-
namespace content {
class BrowserContext;
class DOMStorageContextImpl;
@@ -77,6 +73,7 @@ class RenderWidgetHelper;
class ResourceContext;
class ResourceDispatcherHostImpl;
struct Referrer;
+struct WebPluginInfo;
// This class filters out incoming IPC messages for the renderer process on the
// IPC thread.
@@ -162,13 +159,13 @@ class RenderMessageFilter : public BrowserMessageFilter {
void OnGetPlugins(bool refresh, IPC::Message* reply_msg);
void GetPluginsCallback(IPC::Message* reply_msg,
- const std::vector<webkit::WebPluginInfo>& plugins);
+ const std::vector<WebPluginInfo>& plugins);
void OnGetPluginInfo(int routing_id,
const GURL& url,
const GURL& policy_url,
const std::string& mime_type,
bool* found,
- webkit::WebPluginInfo* info,
+ WebPluginInfo* info,
std::string* actual_mime_type);
void OnOpenChannelToPlugin(int routing_id,
const GURL& url,