summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
diff options
context:
space:
mode:
authortfarina <tfarina@chromium.org>2014-10-04 18:02:09 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-05 01:02:31 +0000
commit556a723898f50c02e6453a0aa5836cd6ba864877 (patch)
treeb796c45fcb678277e323af216de2dd7c2ca9e591 /content/ppapi_plugin
parent926dd7d7a71e57ed4c98fe1c7b96bf8c81a677d8 (diff)
downloadchromium_src-556a723898f50c02e6453a0aa5836cd6ba864877.zip
chromium_src-556a723898f50c02e6453a0aa5836cd6ba864877.tar.gz
chromium_src-556a723898f50c02e6453a0aa5836cd6ba864877.tar.bz2
content: Rename all classes with WebKitPlatform to BlinkPlatform.
BUG=359244 TEST=None R=avi@chromium.org Review URL: https://codereview.chromium.org/628793003 Cr-Commit-Position: refs/heads/master@{#298176}
Diffstat (limited to 'content/ppapi_plugin')
-rw-r--r--content/ppapi_plugin/BUILD.gn4
-rw-r--r--content/ppapi_plugin/ppapi_blink_platform_impl.cc (renamed from content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc)96
-rw-r--r--content/ppapi_plugin/ppapi_blink_platform_impl.h (renamed from content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h)16
-rw-r--r--content/ppapi_plugin/ppapi_thread.cc8
-rw-r--r--content/ppapi_plugin/ppapi_thread.h6
5 files changed, 66 insertions, 64 deletions
diff --git a/content/ppapi_plugin/BUILD.gn b/content/ppapi_plugin/BUILD.gn
index 6c111ec..eff00a52 100644
--- a/content/ppapi_plugin/BUILD.gn
+++ b/content/ppapi_plugin/BUILD.gn
@@ -10,12 +10,12 @@ source_set("ppapi_plugin") {
"broker_process_dispatcher.h",
"plugin_process_dispatcher.cc",
"plugin_process_dispatcher.h",
+ "ppapi_blink_platform_impl.cc",
+ "ppapi_blink_platform_impl.h",
"ppapi_broker_main.cc",
"ppapi_plugin_main.cc",
"ppapi_thread.cc",
"ppapi_thread.h",
- "ppapi_webkitplatformsupport_impl.cc",
- "ppapi_webkitplatformsupport_impl.h",
]
configs += [ "//content:content_implementation" ]
diff --git a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc b/content/ppapi_plugin/ppapi_blink_platform_impl.cc
index c4a1153..0904975 100644
--- a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.cc
+++ b/content/ppapi_plugin/ppapi_blink_platform_impl.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h"
+#include "content/ppapi_plugin/ppapi_blink_platform_impl.h"
#include <map>
@@ -38,16 +38,14 @@ typedef struct CGFont* CGFontRef;
namespace content {
-class PpapiWebKitPlatformSupportImpl::SandboxSupport
- : public WebSandboxSupport {
+class PpapiBlinkPlatformImpl::SandboxSupport : public WebSandboxSupport {
public:
virtual ~SandboxSupport() {}
#if defined(OS_WIN)
virtual bool ensureFontLoaded(HFONT);
#elif defined(OS_MACOSX)
- virtual bool loadFont(
- NSFont* srcFont, CGFontRef* out, uint32_t* fontID);
+ virtual bool loadFont(NSFont* srcFont, CGFontRef* out, uint32_t* fontID);
#elif defined(OS_ANDROID)
// Empty class.
#elif defined(OS_POSIX)
@@ -56,8 +54,9 @@ class PpapiWebKitPlatformSupportImpl::SandboxSupport
WebUChar32 character,
const char* preferred_locale,
blink::WebFallbackFont* fallbackFont);
- virtual void getRenderStyleForStrike(
- const char* family, int sizeAndStyle, blink::WebFontRenderStyle* out);
+ virtual void getRenderStyleForStrike(const char* family,
+ int sizeAndStyle,
+ blink::WebFontRenderStyle* out);
private:
// WebKit likes to ask us for the correct font family to use for a set of
@@ -71,8 +70,7 @@ class PpapiWebKitPlatformSupportImpl::SandboxSupport
#if defined(OS_WIN)
-bool PpapiWebKitPlatformSupportImpl::SandboxSupport::ensureFontLoaded(
- HFONT font) {
+bool PpapiBlinkPlatformImpl::SandboxSupport::ensureFontLoaded(HFONT font) {
LOGFONT logfont;
GetObject(font, sizeof(LOGFONT), &logfont);
@@ -84,12 +82,11 @@ bool PpapiWebKitPlatformSupportImpl::SandboxSupport::ensureFontLoaded(
#elif defined(OS_MACOSX)
-bool PpapiWebKitPlatformSupportImpl::SandboxSupport::loadFont(
- NSFont* src_font,
- CGFontRef* out,
- uint32_t* font_id) {
+bool PpapiBlinkPlatformImpl::SandboxSupport::loadFont(NSFont* src_font,
+ CGFontRef* out,
+ uint32_t* font_id) {
// TODO(brettw) this should do the something similar to what
- // RendererWebKitClientImpl does and request that the browser load the font.
+ // RendererBlinkPlatformImpl does and request that the browser load the font.
// Note: need to unlock the proxy lock like ensureFontLoaded does.
NOTIMPLEMENTED();
return false;
@@ -101,12 +98,11 @@ bool PpapiWebKitPlatformSupportImpl::SandboxSupport::loadFont(
#elif defined(OS_POSIX)
-PpapiWebKitPlatformSupportImpl::SandboxSupport::SandboxSupport()
+PpapiBlinkPlatformImpl::SandboxSupport::SandboxSupport()
: creation_thread_(base::PlatformThread::CurrentId()) {
}
-void
-PpapiWebKitPlatformSupportImpl::SandboxSupport::getFallbackFontForCharacter(
+void PpapiBlinkPlatformImpl::SandboxSupport::getFallbackFontForCharacter(
WebUChar32 character,
const char* preferred_locale,
blink::WebFallbackFont* fallbackFont) {
@@ -129,64 +125,65 @@ PpapiWebKitPlatformSupportImpl::SandboxSupport::getFallbackFontForCharacter(
unicode_font_families_.insert(std::make_pair(character, *fallbackFont));
}
-void PpapiWebKitPlatformSupportImpl::SandboxSupport::getRenderStyleForStrike(
- const char* family, int sizeAndStyle, blink::WebFontRenderStyle* out) {
+void PpapiBlinkPlatformImpl::SandboxSupport::getRenderStyleForStrike(
+ const char* family,
+ int sizeAndStyle,
+ blink::WebFontRenderStyle* out) {
GetRenderStyleForStrike(family, sizeAndStyle, out);
}
#endif
-PpapiWebKitPlatformSupportImpl::PpapiWebKitPlatformSupportImpl()
- : sandbox_support_(new PpapiWebKitPlatformSupportImpl::SandboxSupport()) {
+PpapiBlinkPlatformImpl::PpapiBlinkPlatformImpl()
+ : sandbox_support_(new PpapiBlinkPlatformImpl::SandboxSupport()) {
}
-PpapiWebKitPlatformSupportImpl::~PpapiWebKitPlatformSupportImpl() {
+PpapiBlinkPlatformImpl::~PpapiBlinkPlatformImpl() {
}
-void PpapiWebKitPlatformSupportImpl::Shutdown() {
+void PpapiBlinkPlatformImpl::Shutdown() {
// SandboxSupport contains a map of WebFontFamily objects, which hold
// WebCStrings, which become invalidated when blink is shut down. Hence, we
// need to clear that map now, just before blink::shutdown() is called.
sandbox_support_.reset();
}
-blink::WebClipboard* PpapiWebKitPlatformSupportImpl::clipboard() {
+blink::WebClipboard* PpapiBlinkPlatformImpl::clipboard() {
NOTREACHED();
return NULL;
}
-blink::WebMimeRegistry* PpapiWebKitPlatformSupportImpl::mimeRegistry() {
+blink::WebMimeRegistry* PpapiBlinkPlatformImpl::mimeRegistry() {
NOTREACHED();
return NULL;
}
-blink::WebFileUtilities* PpapiWebKitPlatformSupportImpl::fileUtilities() {
+blink::WebFileUtilities* PpapiBlinkPlatformImpl::fileUtilities() {
NOTREACHED();
return NULL;
}
-blink::WebSandboxSupport* PpapiWebKitPlatformSupportImpl::sandboxSupport() {
+blink::WebSandboxSupport* PpapiBlinkPlatformImpl::sandboxSupport() {
return sandbox_support_.get();
}
-bool PpapiWebKitPlatformSupportImpl::sandboxEnabled() {
+bool PpapiBlinkPlatformImpl::sandboxEnabled() {
return true; // Assume PPAPI is always sandboxed.
}
-unsigned long long PpapiWebKitPlatformSupportImpl::visitedLinkHash(
+unsigned long long PpapiBlinkPlatformImpl::visitedLinkHash(
const char* canonical_url,
size_t length) {
NOTREACHED();
return 0;
}
-bool PpapiWebKitPlatformSupportImpl::isLinkVisited(
- unsigned long long link_hash) {
+bool PpapiBlinkPlatformImpl::isLinkVisited(unsigned long long link_hash) {
NOTREACHED();
return false;
}
-void PpapiWebKitPlatformSupportImpl::createMessageChannel(
+void PpapiBlinkPlatformImpl::createMessageChannel(
blink::WebMessagePortChannel** channel1,
blink::WebMessagePortChannel** channel2) {
NOTREACHED();
@@ -194,66 +191,71 @@ void PpapiWebKitPlatformSupportImpl::createMessageChannel(
*channel2 = NULL;
}
-void PpapiWebKitPlatformSupportImpl::setCookies(
+void PpapiBlinkPlatformImpl::setCookies(
const blink::WebURL& url,
const blink::WebURL& first_party_for_cookies,
const blink::WebString& value) {
NOTREACHED();
}
-blink::WebString PpapiWebKitPlatformSupportImpl::cookies(
+blink::WebString PpapiBlinkPlatformImpl::cookies(
const blink::WebURL& url,
const blink::WebURL& first_party_for_cookies) {
NOTREACHED();
return blink::WebString();
}
-blink::WebString PpapiWebKitPlatformSupportImpl::defaultLocale() {
+blink::WebString PpapiBlinkPlatformImpl::defaultLocale() {
NOTREACHED();
return blink::WebString();
}
-blink::WebThemeEngine* PpapiWebKitPlatformSupportImpl::themeEngine() {
+blink::WebThemeEngine* PpapiBlinkPlatformImpl::themeEngine() {
NOTREACHED();
return NULL;
}
-blink::WebURLLoader* PpapiWebKitPlatformSupportImpl::createURLLoader() {
+blink::WebURLLoader* PpapiBlinkPlatformImpl::createURLLoader() {
NOTREACHED();
return NULL;
}
blink::WebSocketStreamHandle*
- PpapiWebKitPlatformSupportImpl::createSocketStreamHandle() {
+PpapiBlinkPlatformImpl::createSocketStreamHandle() {
NOTREACHED();
return NULL;
}
-void PpapiWebKitPlatformSupportImpl::getPluginList(bool refresh,
+void PpapiBlinkPlatformImpl::getPluginList(
+ bool refresh,
blink::WebPluginListBuilder* builder) {
NOTREACHED();
}
-blink::WebData PpapiWebKitPlatformSupportImpl::loadResource(const char* name) {
+blink::WebData PpapiBlinkPlatformImpl::loadResource(const char* name) {
NOTREACHED();
return blink::WebData();
}
blink::WebStorageNamespace*
-PpapiWebKitPlatformSupportImpl::createLocalStorageNamespace() {
+PpapiBlinkPlatformImpl::createLocalStorageNamespace() {
NOTREACHED();
return 0;
}
-void PpapiWebKitPlatformSupportImpl::dispatchStorageEvent(
- const blink::WebString& key, const blink::WebString& old_value,
- const blink::WebString& new_value, const blink::WebString& origin,
- const blink::WebURL& url, bool is_local_storage) {
+void PpapiBlinkPlatformImpl::dispatchStorageEvent(
+ const blink::WebString& key,
+ const blink::WebString& old_value,
+ const blink::WebString& new_value,
+ const blink::WebString& origin,
+ const blink::WebURL& url,
+ bool is_local_storage) {
NOTREACHED();
}
-int PpapiWebKitPlatformSupportImpl::databaseDeleteFile(
- const blink::WebString& vfs_file_name, bool sync_dir) {
+int PpapiBlinkPlatformImpl::databaseDeleteFile(
+ const blink::WebString& vfs_file_name,
+ bool sync_dir) {
NOTREACHED();
return 0;
}
diff --git a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h b/content/ppapi_plugin/ppapi_blink_platform_impl.h
index 3361304..daba3f4 100644
--- a/content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h
+++ b/content/ppapi_plugin/ppapi_blink_platform_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_PPAPI_PLUGIN_PPAPI_WEBKITPLATFORMSUPPORT_IMPL_H_
-#define CONTENT_PPAPI_PLUGIN_PPAPI_WEBKITPLATFORMSUPPORT_IMPL_H_
+#ifndef CONTENT_PPAPI_PLUGIN_PPAPI_BLINK_PLATFORM_IMPL_H_
+#define CONTENT_PPAPI_PLUGIN_PPAPI_BLINK_PLATFORM_IMPL_H_
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
@@ -11,15 +11,15 @@
namespace content {
-class PpapiWebKitPlatformSupportImpl : public BlinkPlatformImpl {
+class PpapiBlinkPlatformImpl : public BlinkPlatformImpl {
public:
- PpapiWebKitPlatformSupportImpl();
- virtual ~PpapiWebKitPlatformSupportImpl();
+ PpapiBlinkPlatformImpl();
+ virtual ~PpapiBlinkPlatformImpl();
// Shutdown must be called just prior to shutting down blink.
void Shutdown();
- // WebKitPlatformSupport methods:
+ // BlinkPlatformImpl methods:
virtual blink::WebClipboard* clipboard();
virtual blink::WebMimeRegistry* mimeRegistry();
virtual blink::WebFileUtilities* fileUtilities();
@@ -54,9 +54,9 @@ class PpapiWebKitPlatformSupportImpl : public BlinkPlatformImpl {
class SandboxSupport;
scoped_ptr<SandboxSupport> sandbox_support_;
- DISALLOW_COPY_AND_ASSIGN(PpapiWebKitPlatformSupportImpl);
+ DISALLOW_COPY_AND_ASSIGN(PpapiBlinkPlatformImpl);
};
} // namespace content
-#endif // CONTENT_PPAPI_PLUGIN_PPAPI_WEBKITPLATFORMSUPPORT_IMPL_H_
+#endif // CONTENT_PPAPI_PLUGIN_PPAPI_BLINK_PLATFORM_IMPL_H_
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index fe5fa1a..142f647 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -24,7 +24,7 @@
#include "content/common/sandbox_util.h"
#include "content/ppapi_plugin/broker_process_dispatcher.h"
#include "content/ppapi_plugin/plugin_process_dispatcher.h"
-#include "content/ppapi_plugin/ppapi_webkitplatformsupport_impl.h"
+#include "content/ppapi_plugin/ppapi_blink_platform_impl.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/pepper_plugin_info.h"
@@ -111,8 +111,8 @@ PpapiThread::PpapiThread(const CommandLine& command_line, bool is_broker)
globals->set_command_line(
command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs));
- webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl);
- blink::initialize(webkit_platform_support_.get());
+ blink_platform_impl_.reset(new PpapiBlinkPlatformImpl);
+ blink::initialize(blink_platform_impl_.get());
if (!is_broker_) {
channel()->AddFilter(
@@ -130,7 +130,7 @@ void PpapiThread::Shutdown() {
ppapi::proxy::PluginGlobals::Get()->ResetPluginProxyDelegate();
if (plugin_entry_points_.shutdown_module)
plugin_entry_points_.shutdown_module();
- webkit_platform_support_->Shutdown();
+ blink_platform_impl_->Shutdown();
blink::shutdown();
}
diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h
index 87ac2cc..505872c 100644
--- a/content/ppapi_plugin/ppapi_thread.h
+++ b/content/ppapi_plugin/ppapi_thread.h
@@ -38,7 +38,7 @@ struct ChannelHandle;
namespace content {
-class PpapiWebKitPlatformSupportImpl;
+class PpapiBlinkPlatformImpl;
class PpapiThread : public ChildThread,
public ppapi::proxy::PluginDispatcher::PluginDelegate,
@@ -149,8 +149,8 @@ class PpapiThread : public ChildThread,
std::map<uint32, ppapi::proxy::PluginDispatcher*> plugin_dispatchers_;
uint32 next_plugin_dispatcher_id_;
- // The WebKitPlatformSupport implementation.
- scoped_ptr<PpapiWebKitPlatformSupportImpl> webkit_platform_support_;
+ // The BlinkPlatformImpl implementation.
+ scoped_ptr<PpapiBlinkPlatformImpl> blink_platform_impl_;
#if defined(OS_WIN)
// Caches the handle to the peer process if this is a broker.