Cleanup namespace usage from animation to exported in platform/

Review URL: https://codereview.chromium.org/458313005

git-svn-id: svn://svn.chromium.org/blink/trunk@180060 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent f01d2537
......@@ -52,8 +52,6 @@ namespace blink {
namespace {
using namespace blink;
class TimingFunctionTest : public ::testing::Test {
public:
void notEqualHelperLoop(Vector<std::pair<std::string, RefPtr<TimingFunction> > >& v)
......
......@@ -637,15 +637,15 @@ void AudioBus::clearSilentFlag()
PassRefPtr<AudioBus> decodeAudioFileData(const char* data, size_t size)
{
blink::WebAudioBus webAudioBus;
if (blink::Platform::current()->loadAudioResource(&webAudioBus, data, size))
WebAudioBus webAudioBus;
if (Platform::current()->loadAudioResource(&webAudioBus, data, size))
return webAudioBus.release();
return nullptr;
}
PassRefPtr<AudioBus> AudioBus::loadPlatformResource(const char* name, float sampleRate)
{
const blink::WebData& resource = blink::Platform::current()->loadResource(name);
const WebData& resource = Platform::current()->loadResource(name);
if (resource.isEmpty())
return nullptr;
......
......@@ -37,4 +37,4 @@ AudioDSPKernel::~AudioDSPKernel()
{
}
}
} // namespace blink
......@@ -59,7 +59,7 @@ AudioDestination::AudioDestination(AudioIOCallback& callback, const String& inpu
, m_isPlaying(false)
{
// Use the optimal buffer size recommended by the audio backend.
m_callbackBufferSize = blink::Platform::current()->audioHardwareBufferSize();
m_callbackBufferSize = Platform::current()->audioHardwareBufferSize();
#if OS(ANDROID)
// The optimum low-latency hardware buffer size is usually too small on Android for WebAudio to
......@@ -82,7 +82,7 @@ AudioDestination::AudioDestination(AudioIOCallback& callback, const String& inpu
if (m_callbackBufferSize + renderBufferSize > fifoSize)
return;
m_audioDevice = adoptPtr(blink::Platform::current()->createAudioDevice(m_callbackBufferSize, numberOfInputChannels, numberOfOutputChannels, sampleRate, this, inputDeviceId));
m_audioDevice = adoptPtr(Platform::current()->createAudioDevice(m_callbackBufferSize, numberOfInputChannels, numberOfOutputChannels, sampleRate, this, inputDeviceId));
ASSERT(m_audioDevice);
// Create a FIFO to handle the possibility of the callback size
......@@ -127,15 +127,15 @@ void AudioDestination::stop()
float AudioDestination::hardwareSampleRate()
{
return static_cast<float>(blink::Platform::current()->audioHardwareSampleRate());
return static_cast<float>(Platform::current()->audioHardwareSampleRate());
}
unsigned long AudioDestination::maxChannelCount()
{
return static_cast<float>(blink::Platform::current()->audioHardwareOutputChannels());
return static_cast<float>(Platform::current()->audioHardwareOutputChannels());
}
void AudioDestination::render(const blink::WebVector<float*>& sourceData, const blink::WebVector<float*>& audioData, size_t numberOfFrames)
void AudioDestination::render(const WebVector<float*>& sourceData, const WebVector<float*>& audioData, size_t numberOfFrames)
{
bool isNumberOfChannelsGood = audioData.size() == m_numberOfOutputChannels;
if (!isNumberOfChannelsGood) {
......
......@@ -44,7 +44,7 @@ class AudioPullFIFO;
// An AudioDestination using Chromium's audio system
class PLATFORM_EXPORT AudioDestination : public blink::WebAudioDevice::RenderCallback, public AudioSourceProvider {
class PLATFORM_EXPORT AudioDestination : public WebAudioDevice::RenderCallback, public AudioSourceProvider {
WTF_MAKE_NONCOPYABLE(AudioDestination);
public:
AudioDestination(AudioIOCallback&, const String& inputDeviceId, unsigned numberOfInputChannels, unsigned numberOfOutputChannels, float sampleRate);
......@@ -60,10 +60,10 @@ public:
float sampleRate() const { return m_sampleRate; }
// blink::WebAudioDevice::RenderCallback
virtual void render(const blink::WebVector<float*>& sourceData, const blink::WebVector<float*>& audioData, size_t numberOfFrames) OVERRIDE;
// WebAudioDevice::RenderCallback
virtual void render(const WebVector<float*>& sourceData, const WebVector<float*>& audioData, size_t numberOfFrames) OVERRIDE;
// blink::AudioSourceProvider
// AudioSourceProvider
virtual void provideInput(AudioBus*, size_t framesToProcess) OVERRIDE;
static float hardwareSampleRate();
......@@ -83,7 +83,7 @@ private:
RefPtr<AudioBus> m_renderBus;
float m_sampleRate;
bool m_isPlaying;
OwnPtr<blink::WebAudioDevice> m_audioDevice;
OwnPtr<WebAudioDevice> m_audioDevice;
size_t m_callbackBufferSize;
OwnPtr<AudioFIFO> m_inputFifo;
......
......@@ -37,4 +37,4 @@ AudioDestinationConsumer::~AudioDestinationConsumer()
{
}
}
} // namespace blink
......@@ -41,4 +41,4 @@ void AudioProcessor::trace(Visitor*)
{
}
}
} // namespace blink
......@@ -97,7 +97,7 @@ void HRTFDatabaseLoader::loadAsynchronously()
if (!m_hrtfDatabase && !m_databaseLoaderThread) {
// Start the asynchronous database loading process.
m_databaseLoaderThread = adoptPtr(blink::Platform::current()->createThread("HRTF database loader"));
m_databaseLoaderThread = adoptPtr(Platform::current()->createThread("HRTF database loader"));
m_databaseLoaderThread->postTask(new Task(WTF::bind(&HRTFDatabaseLoader::load, this)));
}
}
......
......@@ -83,7 +83,7 @@ private:
// Holding a m_threadLock is required when accessing m_databaseLoaderThread since we access it from multiple threads.
Mutex m_threadLock;
OwnPtr<blink::WebThread> m_databaseLoaderThread;
OwnPtr<WebThread> m_databaseLoaderThread;
float m_databaseSampleRate;
};
......
......@@ -122,7 +122,7 @@ ReverbConvolver::ReverbConvolver(AudioChannel* impulseResponse, size_t renderSli
// Start up background thread
// FIXME: would be better to up the thread priority here. It doesn't need to be real-time, but higher than the default...
if (useBackgroundThreads && m_backgroundStages.size() > 0)
m_backgroundThread = adoptPtr(blink::Platform::current()->createThread("Reverb convolution background thread"));
m_backgroundThread = adoptPtr(Platform::current()->createThread("Reverb convolution background thread"));
}
ReverbConvolver::~ReverbConvolver()
......
......@@ -39,13 +39,10 @@
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
namespace blink {
class WebThread;
}
namespace blink {
class AudioChannel;
class WebThread;
class PLATFORM_EXPORT ReverbConvolver {
WTF_MAKE_NONCOPYABLE(ReverbConvolver);
......@@ -83,7 +80,7 @@ private:
size_t m_maxRealtimeFFTSize;
// Background thread and synchronization
OwnPtr<blink::WebThread> m_backgroundThread;
OwnPtr<WebThread> m_backgroundThread;
};
} // namespace blink
......
......@@ -106,7 +106,7 @@ void BlobData::appendText(const String& text, bool doNormalizeLineEndingsToNativ
CString utf8Text = UTF8Encoding().normalizeAndEncode(text, WTF::EntitiesForUnencodables);
if (doNormalizeLineEndingsToNative) {
blink::normalizeLineEndingsToNative(utf8Text, *buffer);
normalizeLineEndingsToNative(utf8Text, *buffer);
} else {
buffer->append(utf8Text.data(), utf8Text.length());
}
......
......@@ -49,11 +49,6 @@
#include "wtf/text/StringHash.h"
#include "wtf/text/WTFString.h"
using blink::WebBlobData;
using blink::WebBlobRegistry;
using blink::WebThreadSafeData;
using WTF::ThreadSpecific;
namespace blink {
class BlobOriginCache : public SecurityOriginCache {
......@@ -104,7 +99,7 @@ public:
static WebBlobRegistry* blobRegistry()
{
return blink::Platform::current()->blobRegistry();
return Platform::current()->blobRegistry();
}
typedef HashMap<String, RefPtr<SecurityOrigin> > BlobURLOriginMap;
......@@ -135,7 +130,7 @@ static void removeFromOriginMap(const KURL& url)
void BlobRegistry::registerBlobData(const String& uuid, PassOwnPtr<BlobData> data)
{
blobRegistry()->registerBlobData(uuid, blink::WebBlobData(data));
blobRegistry()->registerBlobData(uuid, WebBlobData(data));
}
void BlobRegistry::addBlobDataRef(const String& uuid)
......
......@@ -39,8 +39,6 @@ class AudioBus : public ThreadSafeRefCounted<AudioBus> {
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
using namespace blink;
namespace blink {
class WebAudioBusPrivate : public AudioBus {
......
......@@ -35,8 +35,6 @@
#include "platform/blob/BlobData.h"
#include "wtf/PassOwnPtr.h"
using namespace blink;
namespace blink {
WebBlobData::WebBlobData()
......
......@@ -27,7 +27,7 @@ void WebContentDecryptionModuleResult::completeWithError(WebContentDecryptionMod
reset();
}
WebContentDecryptionModuleResult::WebContentDecryptionModuleResult(blink::ContentDecryptionModuleResult* impl)
WebContentDecryptionModuleResult::WebContentDecryptionModuleResult(ContentDecryptionModuleResult* impl)
: m_impl(impl)
{
ASSERT(m_impl.get());
......
......@@ -8,12 +8,9 @@
#include "platform/EventTracer.h"
#include "public/platform/WebString.h"
using blink::WebConvertableToTraceFormat;
using blink::WebString;
namespace blink {
WebConvertableToTraceFormat::WebConvertableToTraceFormat(blink::TraceEvent::ConvertableToTraceFormat* convertable)
WebConvertableToTraceFormat::WebConvertableToTraceFormat(TraceEvent::ConvertableToTraceFormat* convertable)
: m_private(convertable)
{
}
......@@ -33,4 +30,4 @@ void WebConvertableToTraceFormat::reset()
m_private.reset();
}
}
} // namespace blink
......@@ -53,7 +53,7 @@ void WebCryptoResult::completeWithBuffer(const WebArrayBuffer& buffer)
void WebCryptoResult::completeWithBuffer(const void* bytes, unsigned bytesSize)
{
WebArrayBuffer buffer = blink::WebArrayBuffer::create(bytesSize, 1);
WebArrayBuffer buffer = WebArrayBuffer::create(bytesSize, 1);
RELEASE_ASSERT(!buffer.isNull());
memcpy(buffer.data(), bytes, bytesSize);
completeWithBuffer(buffer);
......@@ -91,7 +91,7 @@ bool WebCryptoResult::cancelled() const
return m_impl->cancelled();
}
WebCryptoResult::WebCryptoResult(const PassRefPtr<blink::CryptoResult>& impl)
WebCryptoResult::WebCryptoResult(const PassRefPtr<CryptoResult>& impl)
: m_impl(impl)
{
ASSERT(m_impl.get());
......
......@@ -33,8 +33,6 @@
#include "platform/Cursor.h"
using namespace blink;
namespace blink {
WebCursorInfo::WebCursorInfo(const Cursor& cursor)
......
......@@ -33,8 +33,6 @@
#include "platform/SharedBuffer.h"
using namespace blink;
namespace blink {
void WebData::reset()
......
......@@ -42,8 +42,6 @@
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
using namespace blink;
namespace blink {
class WebFileSystemCallbacksPrivate : public RefCounted<WebFileSystemCallbacksPrivate> {
......@@ -131,7 +129,7 @@ void WebFileSystemCallbacks::didOpenFileSystem(const WebString& name, const WebU
void WebFileSystemCallbacks::didResolveURL(const WebString& name, const WebURL& rootURL, WebFileSystemType type, const WebString& filePath, bool isDirectory)
{
ASSERT(!m_private.isNull());
m_private->callbacks()->didResolveURL(name, rootURL, static_cast<blink::FileSystemType>(type), filePath, isDirectory);
m_private->callbacks()->didResolveURL(name, rootURL, static_cast<FileSystemType>(type), filePath, isDirectory);
m_private.reset();
}
......
......@@ -34,8 +34,6 @@
#include "platform/FileMetadata.h"
#include "platform/network/FormData.h"
using namespace blink;
namespace blink {
class WebHTTPBodyPrivate : public FormData {
......
......@@ -35,8 +35,6 @@
#include "public/platform/WebHTTPHeaderVisitor.h"
#include "public/platform/WebString.h"
using namespace blink;
namespace blink {
void WebHTTPLoadInfo::initialize()
......@@ -54,12 +52,12 @@ void WebHTTPLoadInfo::assign(const WebHTTPLoadInfo& r)
m_private = r.m_private;
}
WebHTTPLoadInfo::WebHTTPLoadInfo(WTF::PassRefPtr<blink::ResourceLoadInfo> value)
WebHTTPLoadInfo::WebHTTPLoadInfo(WTF::PassRefPtr<ResourceLoadInfo> value)
: m_private(value)
{
}
WebHTTPLoadInfo::operator WTF::PassRefPtr<blink::ResourceLoadInfo>() const
WebHTTPLoadInfo::operator WTF::PassRefPtr<ResourceLoadInfo>() const
{
return m_private.get();
}
......
......@@ -44,8 +44,6 @@
#include "wtf/Vector.h"
#include <algorithm>
using namespace blink;
namespace blink {
WebImage WebImage::fromData(const WebData& data, const WebSize& desiredSize)
......
......@@ -37,8 +37,6 @@
#include "wtf/PassOwnPtr.h"
#include "wtf/Vector.h"
using namespace blink;
namespace blink {
namespace {
......@@ -55,12 +53,12 @@ private:
} // namespace
WebMediaStream::WebMediaStream(const PassRefPtr<blink::MediaStreamDescriptor>& mediaStreamDescriptor)
WebMediaStream::WebMediaStream(const PassRefPtr<MediaStreamDescriptor>& mediaStreamDescriptor)
: m_private(mediaStreamDescriptor)
{
}
WebMediaStream::WebMediaStream(blink::MediaStreamDescriptor* mediaStreamDescriptor)
WebMediaStream::WebMediaStream(MediaStreamDescriptor* mediaStreamDescriptor)
: m_private(mediaStreamDescriptor)
{
}
......@@ -118,18 +116,18 @@ void WebMediaStream::removeTrack(const WebMediaStreamTrack& track)
m_private->removeRemoteTrack(track);
}
WebMediaStream& WebMediaStream::operator=(const PassRefPtr<blink::MediaStreamDescriptor>& mediaStreamDescriptor)
WebMediaStream& WebMediaStream::operator=(const PassRefPtr<MediaStreamDescriptor>& mediaStreamDescriptor)
{
m_private = mediaStreamDescriptor;
return *this;
}
WebMediaStream::operator PassRefPtr<blink::MediaStreamDescriptor>() const
WebMediaStream::operator PassRefPtr<MediaStreamDescriptor>() const
{
return m_private.get();
}
WebMediaStream::operator blink::MediaStreamDescriptor*() const
WebMediaStream::operator MediaStreamDescriptor*() const
{
return m_private.get();
}
......
......@@ -41,8 +41,6 @@
#include "wtf/PassOwnPtr.h"
#include "wtf/Vector.h"
using namespace blink;
namespace blink {
namespace {
......@@ -65,7 +63,7 @@ WebMediaStreamSource WebMediaStreamSource::ExtraData::owner()
return WebMediaStreamSource(m_owner);
}
void WebMediaStreamSource::ExtraData::setOwner(blink::MediaStreamSource* owner)
void WebMediaStreamSource::ExtraData::setOwner(MediaStreamSource* owner)
{
ASSERT(!m_owner);
m_owner = owner;
......@@ -76,7 +74,7 @@ WebMediaStreamSource::WebMediaStreamSource(const PassRefPtr<MediaStreamSource>&
{
}
WebMediaStreamSource& WebMediaStreamSource::operator=(blink::MediaStreamSource* mediaStreamSource)
WebMediaStreamSource& WebMediaStreamSource::operator=(MediaStreamSource* mediaStreamSource)
{
m_private = mediaStreamSource;
return *this;
......@@ -168,7 +166,7 @@ bool WebMediaStreamSource::requiresAudioConsumer() const
return m_private->requiresAudioConsumer();
}
class ConsumerWrapper : public blink::AudioDestinationConsumer {
class ConsumerWrapper : public AudioDestinationConsumer {
public:
static PassRefPtr<ConsumerWrapper> create(WebAudioDestinationConsumer* consumer)
{
......@@ -199,7 +197,7 @@ void ConsumerWrapper::consumeAudio(AudioBus* bus, size_t numberOfFrames)
// Wrap AudioBus.
size_t numberOfChannels = bus->numberOfChannels();
blink::WebVector<const float*> busVector(numberOfChannels);
WebVector<const float*> busVector(numberOfChannels);
for (size_t i = 0; i < numberOfChannels; ++i)
busVector[i] = bus->channel(i)->data();
......
......@@ -33,8 +33,6 @@
#include "public/platform/WebMediaStreamSource.h"
#include "public/platform/WebString.h"
using namespace blink;
namespace blink {
namespace {
......@@ -57,23 +55,23 @@ WebMediaStreamTrack WebMediaStreamTrack::ExtraData::owner()
return WebMediaStreamTrack(m_owner);
}
void WebMediaStreamTrack::ExtraData::setOwner(blink::MediaStreamComponent* owner)
void WebMediaStreamTrack::ExtraData::setOwner(MediaStreamComponent* owner)
{
ASSERT(!m_owner);
m_owner = owner;
}
WebMediaStreamTrack::WebMediaStreamTrack(PassRefPtr<blink::MediaStreamComponent> mediaStreamComponent)
WebMediaStreamTrack::WebMediaStreamTrack(PassRefPtr<MediaStreamComponent> mediaStreamComponent)
: m_private(mediaStreamComponent)
{
}
WebMediaStreamTrack::WebMediaStreamTrack(blink::MediaStreamComponent* mediaStreamComponent)
WebMediaStreamTrack::WebMediaStreamTrack(MediaStreamComponent* mediaStreamComponent)
: m_private(mediaStreamComponent)
{
}
WebMediaStreamTrack& WebMediaStreamTrack::operator=(blink::MediaStreamComponent* mediaStreamComponent)
WebMediaStreamTrack& WebMediaStreamTrack::operator=(MediaStreamComponent* mediaStreamComponent)
{
m_private = mediaStreamComponent;
return *this;
......
......@@ -31,8 +31,6 @@
#include "wtf/PassOwnPtr.h"
#include "wtf/text/WTFString.h"
using namespace blink;
namespace blink {
namespace {
......
......@@ -8,8 +8,6 @@
#include "platform/PermissionCallbacks.h"
using namespace blink;
namespace blink {
class WebPermissionCallbacksPrivate : public RefCounted<WebPermissionCallbacksPrivate> {
......
......@@ -38,7 +38,7 @@ namespace blink {
namespace {
class ExtraDataContainer : public blink::Prerender::ExtraData {
class ExtraDataContainer : public Prerender::ExtraData {
public:
static PassRefPtr<ExtraDataContainer> create(WebPrerender::ExtraData* extraData) { return adoptRef(new ExtraDataContainer(extraData)); }
......@@ -57,12 +57,12 @@ private:
} // anon namespace
WebPrerender::WebPrerender(PassRefPtr<blink::Prerender> prerender)
WebPrerender::WebPrerender(PassRefPtr<Prerender> prerender)
: m_private(prerender)
{
}
const blink::Prerender* WebPrerender::toPrerender() const
const Prerender* WebPrerender::toPrerender() const
{
return m_private.get();
}
......@@ -109,7 +109,7 @@ void WebPrerender::setExtraData(WebPrerender::ExtraData* extraData)
const WebPrerender::ExtraData* WebPrerender::extraData() const
{
RefPtr<blink::Prerender::ExtraData> webcoreExtraData = m_private->extraData();
RefPtr<Prerender::ExtraData> webcoreExtraData = m_private->extraData();
if (!webcoreExtraData)
return 0;
return static_cast<ExtraDataContainer*>(webcoreExtraData.get())->extraData();
......
......@@ -51,4 +51,4 @@ WebPrerenderingSupport* WebPrerenderingSupport::current()
return s_platform;
}
}
} // namespace blink
......@@ -37,8 +37,6 @@
#include "public/platform/WebURL.h"
#include "public/platform/WebVector.h"
using namespace blink;
namespace blink {
WebRTCICEServer::WebRTCICEServer(const PassRefPtr<RTCIceServer>& iceServer)
......
......@@ -7,8 +7,6 @@
#include "platform/mediastream/RTCOfferOptions.h"
using namespace blink;
namespace blink {
WebRTCOfferOptions::WebRTCOfferOptions(const PassRefPtr<RTCOfferOptions>& options)
......
......@@ -36,8 +36,6 @@
#include "public/platform/WebRTCSessionDescription.h"
#include "wtf/PassOwnPtr.h"
using namespace blink;
namespace blink {
namespace {
......
......@@ -39,8 +39,6 @@
#include "public/platform/WebRTCStatsResponse.h"
#include "wtf/PassOwnPtr.h"
using namespace blink;
namespace blink {
WebRTCStatsRequest::WebRTCStatsRequest(const PassRefPtr<RTCStatsRequest>& request)
......
......@@ -29,8 +29,6 @@
#include "wtf/PassOwnPtr.h"
#include "wtf/text/WTFString.h"
using namespace blink;
namespace blink {
WebRTCStatsResponse::WebRTCStatsResponse(RTCStatsResponseBase* request)
......@@ -48,7 +46,7 @@ void WebRTCStatsResponse::reset()
m_private.reset();
}
WebRTCStatsResponse::operator blink::RTCStatsResponseBase*() const
WebRTCStatsResponse::operator RTCStatsResponseBase*() const
{
return m_private.get();
}
......
......@@ -35,8 +35,6 @@
#include "platform/mediastream/RTCVoidRequest.h"
#include "wtf/PassOwnPtr.h"
using namespace blink;
namespace blink {
namespace {
......
......@@ -28,7 +28,7 @@ WebSchedulerProxy WebSchedulerProxy::create()
}
WebSchedulerProxy::WebSchedulerProxy()
: m_scheduler(blink::Scheduler::shared())
: m_scheduler(Scheduler::shared())
{
ASSERT(m_scheduler);
}
......
......@@ -31,7 +31,7 @@
namespace blink {
WebScrollbarImpl::WebScrollbarImpl(blink::Scrollbar* scrollbar)
WebScrollbarImpl::WebScrollbarImpl(Scrollbar* scrollbar)
: m_scrollbar(scrollbar)
{
}
......@@ -83,7 +83,7 @@ bool WebScrollbarImpl::isScrollableAreaActive() const
void WebScrollbarImpl::getTickmarks(WebVector<WebRect>& webTickmarks) const
{
Vector<blink::IntRect> tickmarks;
Vector<IntRect> tickmarks;
m_scrollbar->getTickmarks(tickmarks);
WebVector<WebRect> result(tickmarks.size());
......
......@@ -28,17 +28,14 @@
#include "platform/PlatformExport.h"
#include "public/platform/WebScrollbar.h"
namespace blink {
class Scrollbar;
}
namespace blink {
class Scrollbar;
class PLATFORM_EXPORT WebScrollbarImpl : public WebScrollbar {
public:
explicit WebScrollbarImpl(blink::Scrollbar*);
explicit WebScrollbarImpl(Scrollbar*);
// Implement blink::WebScrollbar methods
// Implement WebScrollbar methods
virtual bool isOverlay() const OVERRIDE;
virtual int value() const OVERRIDE;
virtual WebPoint location() const OVERRIDE;
......@@ -60,7 +57,7 @@ public:
virtual void setIsAlphaLocked(bool) OVERRIDE;
private:
RefPtr<blink::Scrollbar> m_scrollbar;
RefPtr<Scrollbar> m_scrollbar;
};
} // namespace blink
......
......@@ -29,8 +29,6 @@
#include "platform/scroll/ScrollbarTheme.h"
using blink::WebScrollbar;
namespace blink {
WebScrollbarThemeClientImpl::WebScrollbarThemeClientImpl(WebScrollbar* scrollbar)
......@@ -111,14 +109,14 @@ void WebScrollbarThemeClientImpl::invalidateRect(const IntRect&)
ASSERT_NOT_REACHED();
}
blink::ScrollbarOverlayStyle WebScrollbarThemeClientImpl::scrollbarOverlayStyle() const
ScrollbarOverlayStyle WebScrollbarThemeClientImpl::scrollbarOverlayStyle() const
{
return static_cast<blink::ScrollbarOverlayStyle>(m_scrollbar->scrollbarOverlayStyle());
return static_cast<ScrollbarOverlayStyle>(m_scrollbar->scrollbarOverlayStyle());
}
void WebScrollbarThemeClientImpl::getTickmarks(Vector<IntRect>& tickmarks) const
{
blink::WebVector<blink::WebRect> webTickmarks;
WebVector<WebRect> webTickmarks;
m_scrollbar->getTickmarks(webTickmarks);
tickmarks.resize(webTickmarks.size());
for (size_t i = 0; i < webTickmarks.size(); ++i)
......@@ -149,9 +147,9 @@ bool WebScrollbarThemeClientImpl::isCustomScrollbar() const
return m_scrollbar->isCustomScrollbar();
}
blink::ScrollbarOrientation WebScrollbarThemeClientImpl::orientation() const
ScrollbarOrientation WebScrollbarThemeClientImpl::orientation() const
{
return static_cast<blink::ScrollbarOrientation>(m_scrollbar->orientation());
return static_cast<ScrollbarOrientation>(m_scrollbar->orientation());
}
bool WebScrollbarThemeClientImpl::isLeftSideVerticalScrollbar() const
......@@ -184,19 +182,19 @@ int WebScrollbarThemeClientImpl::maximum() const
return m_scrollbar->maximum();
}
blink::ScrollbarControlSize WebScrollbarThemeClientImpl::controlSize() const
ScrollbarControlSize WebScrollbarThemeClientImpl::controlSize() const
{
return static_cast<blink::ScrollbarControlSize>(m_scrollbar->controlSize());
return static_cast<ScrollbarControlSize>(m_scrollbar->controlSize());
}
blink::ScrollbarPart WebScrollbarThemeClientImpl::pressedPart() const
ScrollbarPart WebScrollbarThemeClientImpl::pressedPart() const
{
return static_cast<blink::ScrollbarPart>(m_scrollbar->pressedPart());
return static_cast<ScrollbarPart>(m_scrollbar->pressedPart());
}
blink::ScrollbarPart WebScrollbarThemeClientImpl::hoveredPart() const
ScrollbarPart WebScrollbarThemeClientImpl::hoveredPart() const
{
return static_cast<blink::ScrollbarPart>(m_scrollbar->hoveredPart());
return static_cast<ScrollbarPart>(m_scrollbar->hoveredPart());
}
void WebScrollbarThemeClientImpl::styleChanged()
......
......@@ -40,7 +40,7 @@ class PLATFORM_EXPORT WebScrollbarThemeClientImpl : public ScrollbarThemeClient
public:
// Caller must retain ownership of this pointer and ensure that its lifetime
// exceeds this instance.
WebScrollbarThemeClientImpl(blink::WebScrollbar*);
WebScrollbarThemeClientImpl(WebScrollbar*);
virtual ~WebScrollbarThemeClientImpl();
// Implement ScrollbarThemeClient interface
......@@ -80,9 +80,9 @@ public:
virtual void setIsAlphaLocked(bool) OVERRIDE;
private:
blink::WebScrollbar* m_scrollbar;
WebScrollbar* m_scrollbar;
};
}
} // namespace blink
#endif // WebScrollbarThemeClientImpl_h
......@@ -31,16 +31,14 @@
#include "platform/scroll/ScrollbarTheme.h"
#include "public/platform/WebScrollbar.h"
using namespace blink;
namespace blink {
PassOwnPtr<blink::WebScrollbarThemeGeometryNative> WebScrollbarThemeGeometryNative::create(blink::ScrollbarTheme* theme)
PassOwnPtr<WebScrollbarThemeGeometryNative> WebScrollbarThemeGeometryNative::create(ScrollbarTheme* theme)
{
return adoptPtr(new WebScrollbarThemeGeometryNative(theme));
}
WebScrollbarThemeGeometryNative::WebScrollbarThemeGeometryNative(blink::ScrollbarTheme* theme)
WebScrollbarThemeGeometryNative::WebScrollbarThemeGeometryNative(ScrollbarTheme* theme)
: m_theme(theme)
{
}
......
......@@ -31,17 +31,14 @@
#include "public/platform/WebScrollbarThemeGeometry.h"
#include "wtf/PassOwnPtr.h"
namespace blink {
class ScrollbarTheme;
}
namespace blink {
class ScrollbarTheme;
class WebScrollbar;
class PLATFORM_EXPORT WebScrollbarThemeGeometryNative : public WebScrollbarThemeGeometry {
public:
static PassOwnPtr<WebScrollbarThemeGeometryNative> create(blink::ScrollbarTheme*);
static PassOwnPtr<WebScrollbarThemeGeometryNative> create(ScrollbarTheme*);
// WebScrollbarThemeGeometry overrides
virtual WebScrollbarThemeGeometryNative* clone() const OVERRIDE;
......@@ -63,12 +60,12 @@ public:
virtual void splitTrack(WebScrollbar*, const WebRect& track, WebRect& startTrack, WebRect& thumb, WebRect& endTrack) OVERRIDE;
private:
explicit WebScrollbarThemeGeometryNative(blink::ScrollbarTheme*);
explicit WebScrollbarThemeGeometryNative(ScrollbarTheme*);
// The theme is not owned by this class. It is assumed that the theme is a
// static pointer and its lifetime is essentially infinite. Only thread-safe
// functions on the theme can be called by this theme.
blink::ScrollbarTheme* m_theme;
ScrollbarTheme* m_theme;
};
} // namespace blink
......
......@@ -9,7 +9,7 @@
namespace blink {
WebSerializedOrigin::WebSerializedOrigin(const blink::SecurityOrigin& origin)
WebSerializedOrigin::WebSerializedOrigin(const SecurityOrigin& origin)
: m_string(origin.toString())
{
}
......
......@@ -5,16 +5,16 @@
#include "config.h"
#include "public/platform/WebServiceWorkerProxy.h"
namespace blink { class ServiceWorker; }
namespace blink {
WebServiceWorkerProxy::WebServiceWorkerProxy(blink::ServiceWorker* serviceWorker)
class ServiceWorker;
WebServiceWorkerProxy::WebServiceWorkerProxy(ServiceWorker* serviceWorker)
: m_private(serviceWorker)
{
}
blink::ServiceWorker* WebServiceWorkerProxy::unwrap() const
ServiceWorker* WebServiceWorkerProxy::unwrap() const
{
return m_private;
}
......
......@@ -13,8 +13,8 @@ public:
: m_isReload(false) { }
WebURL m_url;
WebString m_method;
blink::HTTPHeaderMap m_headers;
blink::Referrer m_referrer;
HTTPHeaderMap m_headers;
Referrer m_referrer;
bool m_isReload;
};
......@@ -60,17 +60,17 @@ void WebServiceWorkerRequest::setHeader(const WebString& key, const WebString& v
m_private->m_headers.add(key, value);
}
const blink::HTTPHeaderMap& WebServiceWorkerRequest::headers() const
const HTTPHeaderMap& WebServiceWorkerRequest::headers() const
{
return m_private->m_headers;
}
void WebServiceWorkerRequest::setReferrer(const WebString& referrer, WebReferrerPolicy referrerPolicy)
{
m_private->m_referrer = blink::Referrer(referrer, static_cast<blink::ReferrerPolicy>(referrerPolicy));
m_private->m_referrer = Referrer(referrer, static_cast<ReferrerPolicy>(referrerPolicy));
}
const blink::Referrer& WebServiceWorkerRequest::referrer() const
const Referrer& WebServiceWorkerRequest::referrer() const
{
return m_private->m_referrer;
}
......
......@@ -15,7 +15,7 @@ public:
unsigned short status;
WebString statusText;
HashMap<String, String> headers;
RefPtr<blink::BlobDataHandle> blobDataHandle;
RefPtr<BlobDataHandle> blobDataHandle;
};
WebServiceWorkerResponse::WebServiceWorkerResponse()
......@@ -97,12 +97,12 @@ const HashMap<String, String>& WebServiceWorkerResponse::headers() const
return m_private->headers;
}
void WebServiceWorkerResponse::setBlobDataHandle(PassRefPtr<blink::BlobDataHandle> blobDataHandle)
void WebServiceWorkerResponse::setBlobDataHandle(PassRefPtr<BlobDataHandle> blobDataHandle)
{
m_private->blobDataHandle = blobDataHandle;
}
PassRefPtr<blink::BlobDataHandle> WebServiceWorkerResponse::blobDataHandle() const
PassRefPtr<BlobDataHandle> WebServiceWorkerResponse::blobDataHandle() const
{
return m_private->blobDataHandle;
}
......
......@@ -35,8 +35,6 @@
#include "public/platform/WebString.h"
#include "public/platform/WebURL.h"
using blink::WebSocketHandshakeRequest;
namespace blink {
WebSocketHandshakeRequestInfo::WebSocketHandshakeRequestInfo() : m_private(WebSocketHandshakeRequest::create())
......
......@@ -34,8 +34,6 @@
#include "platform/network/WebSocketHandshakeResponse.h"
#include "public/platform/WebString.h"
using blink::WebSocketHandshakeResponse;
namespace blink {
WebSocketHandshakeResponseInfo::WebSocketHandshakeResponseInfo() : m_private(new WebSocketHandshakeResponse)
......
......@@ -34,8 +34,6 @@
#include "platform/network/SocketStreamError.h"
#include "public/platform/WebString.h"
using namespace blink;
namespace blink {
void WebSocketStreamError::assign(int code, const WebString& message)
......@@ -69,4 +67,4 @@ WebSocketStreamError::operator PassRefPtr<SocketStreamError>() const
return m_private.get();
}
}
} // namespace blink
......@@ -31,16 +31,14 @@
#include "wtf/PassRefPtr.h"
#include "wtf/RefPtr.h"
using namespace blink;
namespace blink {
WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance(blink::PlatformSpeechSynthesisUtterance* utterance)
WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance(PlatformSpeechSynthesisUtterance* utterance)
: m_private(utterance)
{
}
WebSpeechSynthesisUtterance& WebSpeechSynthesisUtterance::operator=(blink::PlatformSpeechSynthesisUtterance* utterance)
WebSpeechSynthesisUtterance& WebSpeechSynthesisUtterance::operator=(PlatformSpeechSynthesisUtterance* utterance)
{
m_private = utterance;
return *this;
......
......@@ -32,7 +32,7 @@
namespace blink {
WebSpeechSynthesisVoice::WebSpeechSynthesisVoice()
: m_private(blink::PlatformSpeechSynthesisVoice::create())
: m_private(PlatformSpeechSynthesisVoice::create())
{
}
......@@ -71,7 +71,7 @@ void WebSpeechSynthesisVoice::setIsDefault(bool isDefault)
m_private->setIsDefault(isDefault);
}
WebSpeechSynthesisVoice::operator blink::PlatformSpeechSynthesisVoice*() const
WebSpeechSynthesisVoice::operator PlatformSpeechSynthesisVoice*() const
{
return m_private.get();
}
......
......@@ -40,7 +40,7 @@ WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl()
{
}
void WebSpeechSynthesizerClientImpl::setVoiceList(const blink::WebVector<blink::WebSpeechSynthesisVoice>& voices)
void WebSpeechSynthesizerClientImpl::setVoiceList(const WebVector<WebSpeechSynthesisVoice>& voices)
{
HeapVector<Member<PlatformSpeechSynthesisVoice> > outVoices;
for (size_t i = 0; i < voices.size(); i++)
......@@ -49,37 +49,37 @@ void WebSpeechSynthesizerClientImpl::setVoiceList(const blink::WebVector<blink::
m_client->voicesDidChange();
}
void WebSpeechSynthesizerClientImpl::didStartSpeaking(const blink::WebSpeechSynthesisUtterance& utterance)
void WebSpeechSynthesizerClientImpl::didStartSpeaking(const WebSpeechSynthesisUtterance& utterance)
{
m_client->didStartSpeaking(utterance);
}
void WebSpeechSynthesizerClientImpl::didFinishSpeaking(const blink::WebSpeechSynthesisUtterance& utterance)
void WebSpeechSynthesizerClientImpl::didFinishSpeaking(const WebSpeechSynthesisUtterance& utterance)
{
m_client->didFinishSpeaking(utterance);
}
void WebSpeechSynthesizerClientImpl::didPauseSpeaking(const blink::WebSpeechSynthesisUtterance& utterance)
void WebSpeechSynthesizerClientImpl::didPauseSpeaking(const WebSpeechSynthesisUtterance& utterance)
{
m_client->didPauseSpeaking(utterance);
}
void WebSpeechSynthesizerClientImpl::didResumeSpeaking(const blink::WebSpeechSynthesisUtterance& utterance)
void WebSpeechSynthesizerClientImpl::didResumeSpeaking(const WebSpeechSynthesisUtterance& utterance)
{
m_client->didResumeSpeaking(utterance);
}
void WebSpeechSynthesizerClientImpl::speakingErrorOccurred(const blink::WebSpeechSynthesisUtterance& utterance)
void WebSpeechSynthesizerClientImpl::speakingErrorOccurred(const WebSpeechSynthesisUtterance& utterance)
{
m_client->speakingErrorOccurred(utterance);
}
void WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred(const blink::WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
void WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred(const WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
{
m_client->boundaryEventOccurred(utterance, SpeechWordBoundary, charIndex);
}
void WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred(const blink::WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
void WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred(const WebSpeechSynthesisUtterance& utterance, unsigned charIndex)
{
m_client->boundaryEventOccurred(utterance, SpeechSentenceBoundary, charIndex);
}
......
......@@ -37,19 +37,19 @@ namespace blink {
class PlatformSpeechSynthesizer;
class PlatformSpeechSynthesizerClient;
class WebSpeechSynthesizerClientImpl FINAL : public GarbageCollectedFinalized<WebSpeechSynthesizerClientImpl>, public blink::WebSpeechSynthesizerClient {
class WebSpeechSynthesizerClientImpl FINAL : public GarbageCollectedFinalized<WebSpeechSynthesizerClientImpl>, public WebSpeechSynthesizerClient {
public:
WebSpeechSynthesizerClientImpl(PlatformSpeechSynthesizer*, PlatformSpeechSynthesizerClient*);
virtual ~WebSpeechSynthesizerClientImpl();
virtual void setVoiceList(const blink::WebVector<blink::WebSpeechSynthesisVoice>& voices);
virtual void didStartSpeaking(const blink::WebSpeechSynthesisUtterance&);
virtual void didFinishSpeaking(const blink::WebSpeechSynthesisUtterance&);
virtual void didPauseSpeaking(const blink::WebSpeechSynthesisUtterance&);
virtual void didResumeSpeaking(const blink::WebSpeechSynthesisUtterance&);
virtual void speakingErrorOccurred(const blink::WebSpeechSynthesisUtterance&);
virtual void wordBoundaryEventOccurred(const blink::WebSpeechSynthesisUtterance&, unsigned charIndex);
virtual void sentenceBoundaryEventOccurred(const blink::WebSpeechSynthesisUtterance&, unsigned charIndex);
virtual void setVoiceList(const WebVector<WebSpeechSynthesisVoice>& voices);
virtual void didStartSpeaking(const WebSpeechSynthesisUtterance&);
virtual void didFinishSpeaking(const WebSpeechSynthesisUtterance&);
virtual void didPauseSpeaking(const WebSpeechSynthesisUtterance&);
virtual void didResumeSpeaking(const WebSpeechSynthesisUtterance&);
virtual void speakingErrorOccurred(const WebSpeechSynthesisUtterance&);
virtual void wordBoundaryEventOccurred(const WebSpeechSynthesisUtterance&, unsigned charIndex);
virtual void sentenceBoundaryEventOccurred(const WebSpeechSynthesisUtterance&, unsigned charIndex);
void trace(Visitor*);
......
......@@ -16,19 +16,19 @@ namespace blink {
class WebStorageQuotaCallbacksPrivate : public RefCounted<WebStorageQuotaCallbacksPrivate> {
public:
static PassRefPtr<WebStorageQuotaCallbacksPrivate> create(const PassOwnPtr<blink::StorageQuotaCallbacks>& callbacks)
static PassRefPtr<WebStorageQuotaCallbacksPrivate> create(const PassOwnPtr<StorageQuotaCallbacks>& callbacks)
{
return adoptRef(new WebStorageQuotaCallbacksPrivate(callbacks));
}
blink::StorageQuotaCallbacks* callbacks() { return m_callbacks.get(); }
StorageQuotaCallbacks* callbacks() { return m_callbacks.get(); }
private:
WebStorageQuotaCallbacksPrivate(const PassOwnPtr<blink::StorageQuotaCallbacks>& callbacks) : m_callbacks(callbacks) { }
OwnPtr<blink::StorageQuotaCallbacks> m_callbacks;
WebStorageQuotaCallbacksPrivate(const PassOwnPtr<StorageQuotaCallbacks>& callbacks) : m_callbacks(callbacks) { }
OwnPtr<StorageQuotaCallbacks> m_callbacks;
};
WebStorageQuotaCallbacks::WebStorageQuotaCallbacks(const PassOwnPtr<blink::StorageQuotaCallbacks>& callbacks)
WebStorageQuotaCallbacks::WebStorageQuotaCallbacks(const PassOwnPtr<StorageQuotaCallbacks>& callbacks)
{
m_private = WebStorageQuotaCallbacksPrivate::create(callbacks);
}
......
......@@ -33,8 +33,6 @@
#include "platform/blob/BlobData.h"
using namespace blink;
namespace blink {
void WebThreadSafeData::reset()
......
......@@ -35,14 +35,14 @@
namespace blink {
WebURL::WebURL(const blink::KURL& url)
WebURL::WebURL(const KURL& url)
: m_string(url.string())
, m_parsed(url.parsed())
, m_isValid(url.isValid())
{
}
WebURL& WebURL::operator=(const blink::KURL& url)
WebURL& WebURL::operator=(const KURL& url)
{
m_string = url.string();
m_parsed = url.parsed();
......@@ -50,9 +50,9 @@ WebURL& WebURL::operator=(const blink::KURL& url)
return *this;
}
WebURL::operator blink::KURL() const
WebURL::operator KURL() const
{
return blink::KURL(m_string, m_parsed, m_isValid);
return KURL(m_string, m_parsed, m_isValid);
}
} // namespace blink
......@@ -35,8 +35,6 @@
#include "platform/weborigin/KURL.h"
#include "wtf/text/CString.h"
using namespace blink;
namespace blink {
WebURLError::WebURLError(const ResourceError& error)
......
......@@ -34,8 +34,6 @@
#include "platform/network/ResourceLoadTiming.h"
#include "public/platform/WebString.h"
using namespace blink;
namespace blink {
void WebURLLoadTiming::initialize()
......
......@@ -37,8 +37,6 @@
#include "public/platform/WebHTTPHeaderVisitor.h"
#include "public/platform/WebURL.h"
using namespace blink;
namespace blink {
namespace {
......
......@@ -31,10 +31,10 @@
#ifndef WebURLRequestPrivate_h
#define WebURLRequestPrivate_h
namespace blink { class ResourceRequest; }
namespace blink {
class ResourceRequest;
class WebURLRequestPrivate {
public:
WebURLRequestPrivate()
......@@ -45,7 +45,7 @@ public:
// Called by WebURLRequest when it no longer needs this object.
virtual void dispose() = 0;
blink::ResourceRequest* m_resourceRequest;
ResourceRequest* m_resourceRequest;
};
} // namespace blink
......
......@@ -41,8 +41,6 @@
#include "public/platform/WebURLLoadTiming.h"
#include "wtf/RefPtr.h"
using namespace blink;
namespace blink {
namespace {
......
......@@ -33,10 +33,10 @@
#include "public/platform/WebString.h"
namespace blink { class ResourceResponse; }
namespace blink {
class ResourceResponse;
class WebURLResponsePrivate {
public:
WebURLResponsePrivate() : m_resourceResponse(0) { }
......@@ -44,7 +44,7 @@ public:
// Called by WebURLResponse when it no longer needs this object.
virtual void dispose() = 0;
blink::ResourceResponse* m_resourceResponse;
ResourceResponse* m_resourceResponse;
};
} // namespace blink
......
......@@ -45,25 +45,25 @@ public:
WrappedResourceRequest() { }
WrappedResourceRequest(blink::ResourceRequest& resourceRequest)
WrappedResourceRequest(ResourceRequest& resourceRequest)
{
bind(resourceRequest);
}
WrappedResourceRequest(const blink::ResourceRequest& resourceRequest)
WrappedResourceRequest(const ResourceRequest& resourceRequest)
{
bind(resourceRequest);
}
void bind(blink::ResourceRequest& resourceRequest)
void bind(ResourceRequest& resourceRequest)
{
m_handle.m_resourceRequest = &resourceRequest;
assign(&m_handle);
}
void bind(const blink::ResourceRequest& resourceRequest)
void bind(const ResourceRequest& resourceRequest)
{
bind(*const_cast<blink::ResourceRequest*>(&resourceRequest));
bind(*const_cast<ResourceRequest*>(&resourceRequest));
}
private:
......
......@@ -45,25 +45,25 @@ public:
WrappedResourceResponse() { }
WrappedResourceResponse(blink::ResourceResponse& resourceResponse)
WrappedResourceResponse(ResourceResponse& resourceResponse)
{
bind(resourceResponse);
}
WrappedResourceResponse(const blink::ResourceResponse& resourceResponse)
WrappedResourceResponse(const ResourceResponse& resourceResponse)
{
bind(resourceResponse);
}
void bind(blink::ResourceResponse& resourceResponse)
void bind(ResourceResponse& resourceResponse)
{
m_handle.m_resourceResponse = &resourceResponse;
assign(&m_handle);
}
void bind(const blink::ResourceResponse& resourceResponse)
void bind(const ResourceResponse& resourceResponse)
{
bind(*const_cast<blink::ResourceResponse*>(&resourceResponse));
bind(*const_cast<ResourceResponse*>(&resourceResponse));
}
private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment