Cleanup namespace usage in Source/core/platform/[A-Z]*.h

Cleanup namespace usage in Source/core/platform/[A-Z]*.h

- Merge multiple |namespace blink {}| block
- Remove unnecessary blink:: prefixes
- Make blank lines consistent

BUG=None

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

git-svn-id: svn://svn.chromium.org/blink/trunk@180218 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e5a00669
...@@ -68,7 +68,7 @@ public: ...@@ -68,7 +68,7 @@ public:
virtual void didReadDirectoryEntries(bool hasMore) { ASSERT_NOT_REACHED(); } virtual void didReadDirectoryEntries(bool hasMore) { ASSERT_NOT_REACHED(); }
// Called when an AsyncFileWrter has been created successfully. // Called when an AsyncFileWrter has been created successfully.
virtual void didCreateFileWriter(PassOwnPtr<blink::WebFileWriter>, long long length) { ASSERT_NOT_REACHED(); } virtual void didCreateFileWriter(PassOwnPtr<WebFileWriter>, long long length) { ASSERT_NOT_REACHED(); }
// Called when there was an error. // Called when there was an error.
virtual void didFail(int code) = 0; virtual void didFail(int code) = 0;
...@@ -91,6 +91,6 @@ private: ...@@ -91,6 +91,6 @@ private:
bool m_blockUntilCompletion; bool m_blockUntilCompletion;
}; };
} // namespace } // namespace blink
#endif // AsyncFileSystemCallbacks_h #endif // AsyncFileSystemCallbacks_h
...@@ -10,10 +10,8 @@ ...@@ -10,10 +10,8 @@
#include "public/platform/WebContentDecryptionModuleResult.h" #include "public/platform/WebContentDecryptionModuleResult.h"
namespace blink { namespace blink {
class WebString;
}
namespace blink { class WebString;
// Used to notify completion of a CDM operation. // Used to notify completion of a CDM operation.
class ContentDecryptionModuleResult : public GarbageCollectedFinalized<ContentDecryptionModuleResult> { class ContentDecryptionModuleResult : public GarbageCollectedFinalized<ContentDecryptionModuleResult> {
...@@ -21,12 +19,12 @@ public: ...@@ -21,12 +19,12 @@ public:
virtual ~ContentDecryptionModuleResult() { } virtual ~ContentDecryptionModuleResult() { }
virtual void complete() = 0; virtual void complete() = 0;
virtual void completeWithSession(blink::WebContentDecryptionModuleResult::SessionStatus) = 0; virtual void completeWithSession(WebContentDecryptionModuleResult::SessionStatus) = 0;
virtual void completeWithError(blink::WebContentDecryptionModuleException, unsigned long systemCode, const blink::WebString&) = 0; virtual void completeWithError(WebContentDecryptionModuleException, unsigned long systemCode, const WebString&) = 0;
blink::WebContentDecryptionModuleResult result() WebContentDecryptionModuleResult result()
{ {
return blink::WebContentDecryptionModuleResult(this); return WebContentDecryptionModuleResult(this);
} }
virtual void trace(Visitor*) { } virtual void trace(Visitor*) { }
......
...@@ -72,7 +72,7 @@ struct CookieHash { ...@@ -72,7 +72,7 @@ struct CookieHash {
return a.name == b.name && a.domain == b.domain && a.path == b.path && a.secure == b.secure; return a.name == b.name && a.domain == b.domain && a.path == b.path && a.secure == b.secure;
} }
}; };
} } // namespace blink
namespace WTF { namespace WTF {
template<typename T> struct DefaultHash; template<typename T> struct DefaultHash;
......
...@@ -31,8 +31,8 @@ enum HashAlgorithm { ...@@ -31,8 +31,8 @@ enum HashAlgorithm {
}; };
PLATFORM_EXPORT bool computeDigest(HashAlgorithm, const char* digestable, size_t length, DigestValue& digestResult); PLATFORM_EXPORT bool computeDigest(HashAlgorithm, const char* digestable, size_t length, DigestValue& digestResult);
PLATFORM_EXPORT PassOwnPtr<blink::WebCryptoDigestor> createDigestor(HashAlgorithm); PLATFORM_EXPORT PassOwnPtr<WebCryptoDigestor> createDigestor(HashAlgorithm);
PLATFORM_EXPORT void finishDigestor(blink::WebCryptoDigestor*, DigestValue& digestResult); PLATFORM_EXPORT void finishDigestor(WebCryptoDigestor*, DigestValue& digestResult);
} // namespace blink } // namespace blink
......
...@@ -41,17 +41,17 @@ class CryptoResult : public ThreadSafeRefCounted<CryptoResult> { ...@@ -41,17 +41,17 @@ class CryptoResult : public ThreadSafeRefCounted<CryptoResult> {
public: public:
virtual ~CryptoResult() { } virtual ~CryptoResult() { }
virtual void completeWithError(blink::WebCryptoErrorType, const blink::WebString&) = 0; virtual void completeWithError(WebCryptoErrorType, const WebString&) = 0;
virtual void completeWithBuffer(const blink::WebArrayBuffer&) = 0; virtual void completeWithBuffer(const WebArrayBuffer&) = 0;
virtual void completeWithJson(const char* utf8Data, unsigned length) = 0; virtual void completeWithJson(const char* utf8Data, unsigned length) = 0;
virtual void completeWithBoolean(bool) = 0; virtual void completeWithBoolean(bool) = 0;
virtual void completeWithKey(const blink::WebCryptoKey&) = 0; virtual void completeWithKey(const WebCryptoKey&) = 0;
virtual void completeWithKeyPair(const blink::WebCryptoKey& publicKey, const blink::WebCryptoKey& privateKey) = 0; virtual void completeWithKeyPair(const WebCryptoKey& publicKey, const WebCryptoKey& privateKey) = 0;
virtual bool cancelled() const = 0; virtual bool cancelled() const = 0;
blink::WebCryptoResult result() WebCryptoResult result()
{ {
return blink::WebCryptoResult(this); return WebCryptoResult(this);
} }
}; };
......
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
const char* argNames[], const char* argNames[],
const unsigned char argTypes[], const unsigned char argTypes[],
const unsigned long long argValues[], const unsigned long long argValues[],
blink::TraceEvent::ConvertableToTraceFormat*[], TraceEvent::ConvertableToTraceFormat*[],
unsigned char flags); unsigned char flags);
static TraceEvent::TraceEventHandle addTraceEvent(char phase, static TraceEvent::TraceEventHandle addTraceEvent(char phase,
const unsigned char* categoryEnabledFlag, const unsigned char* categoryEnabledFlag,
......
...@@ -30,15 +30,12 @@ ...@@ -30,15 +30,12 @@
#include "wtf/FastAllocBase.h" #include "wtf/FastAllocBase.h"
#include "wtf/Noncopyable.h" #include "wtf/Noncopyable.h"
namespace blink {
struct WebScreenInfo;
}
namespace blink { namespace blink {
class Cursor; class Cursor;
class IntPoint; class IntPoint;
class IntRect; class IntRect;
class IntSize; class IntSize;
struct WebScreenInfo;
class PLATFORM_EXPORT HostWindow { class PLATFORM_EXPORT HostWindow {
WTF_MAKE_NONCOPYABLE(HostWindow); WTF_MAKE_FAST_ALLOCATED; WTF_MAKE_NONCOPYABLE(HostWindow); WTF_MAKE_FAST_ALLOCATED;
...@@ -57,7 +54,7 @@ public: ...@@ -57,7 +54,7 @@ public:
// Methods for doing coordinate conversions to screen coordinates. // Methods for doing coordinate conversions to screen coordinates.
virtual IntRect rootViewToScreen(const IntRect&) const = 0; virtual IntRect rootViewToScreen(const IntRect&) const = 0;
virtual blink::WebScreenInfo screenInfo() const = 0; virtual WebScreenInfo screenInfo() const = 0;
virtual void scheduleAnimation() = 0; virtual void scheduleAnimation() = 0;
}; };
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
namespace blink { namespace blink {
PLATFORM_EXPORT WTFLogChannel* notImplementedLoggingChannel(); PLATFORM_EXPORT WTFLogChannel* notImplementedLoggingChannel();
} } // namespace blink
#define notImplemented() do { \ #define notImplemented() do { \
static bool havePrinted = false; \ static bool havePrinted = false; \
......
...@@ -60,10 +60,10 @@ namespace blink { ...@@ -60,10 +60,10 @@ namespace blink {
// enabled. This requires the following template specializations to be // enabled. This requires the following template specializations to be
// available: // available:
// //
// template<> struct blink::ValueToString<T> { // template<> struct ValueToString<T> {
// static String string(const T& t); // static String string(const T& t);
// }; // };
// template<> struct blink::ValueToString<UserData> { // template<> struct ValueToString<UserData> {
// static String string(const UserData& t); // static String string(const UserData& t);
// }; // };
// //
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
// In debug mode, printing of the data contained in the tree is // In debug mode, printing of the data contained in the tree is
// enabled. This requires the template specialization to be available: // enabled. This requires the template specialization to be available:
// //
// template<> struct blink::ValueToString<T> { // template<> struct ValueToString<T> {
// static String string(const T& t); // static String string(const T& t);
// }; // };
// //
......
...@@ -47,7 +47,7 @@ PLATFORM_EXPORT FloatRect screenAvailableRect(Widget*); ...@@ -47,7 +47,7 @@ PLATFORM_EXPORT FloatRect screenAvailableRect(Widget*);
PLATFORM_EXPORT void screenColorProfile(ColorProfile&); PLATFORM_EXPORT void screenColorProfile(ColorProfile&);
PLATFORM_EXPORT uint16_t screenOrientationAngle(Widget*); PLATFORM_EXPORT uint16_t screenOrientationAngle(Widget*);
PLATFORM_EXPORT blink::WebScreenOrientationType screenOrientationType(Widget*); PLATFORM_EXPORT WebScreenOrientationType screenOrientationType(Widget*);
} // namespace blink } // namespace blink
......
...@@ -40,10 +40,6 @@ namespace blink { ...@@ -40,10 +40,6 @@ namespace blink {
class WebDiscardableMemory; class WebDiscardableMemory;
} // namespace blink
namespace blink {
// A simple vector implementation that supports purgeable memory. The vector is // A simple vector implementation that supports purgeable memory. The vector is
// already locked at construction and locking uses an internal counter which // already locked at construction and locking uses an internal counter which
// means that N calls to lock() must be followed by N+1 calls to unlock() to // means that N calls to lock() must be followed by N+1 calls to unlock() to
...@@ -115,7 +111,7 @@ private: ...@@ -115,7 +111,7 @@ private:
// Note that there can't be data both in |m_vector| and // Note that there can't be data both in |m_vector| and
// |m_discardable|, i.e. only one of them is used at a given time. // |m_discardable|, i.e. only one of them is used at a given time.
Vector<char> m_vector; Vector<char> m_vector;
OwnPtr<blink::WebDiscardableMemory> m_discardable; OwnPtr<WebDiscardableMemory> m_discardable;
size_t m_discardableCapacity; size_t m_discardableCapacity;
size_t m_discardableSize; size_t m_discardableSize;
bool m_isPurgeable; bool m_isPurgeable;
......
...@@ -46,7 +46,7 @@ public: ...@@ -46,7 +46,7 @@ public:
virtual void didQueryStorageUsageAndQuota(unsigned long long usageInBytes, unsigned long long quotaInBytes) { ASSERT_NOT_REACHED(); }; virtual void didQueryStorageUsageAndQuota(unsigned long long usageInBytes, unsigned long long quotaInBytes) { ASSERT_NOT_REACHED(); };
virtual void didGrantStorageQuota(unsigned long long usageInBytes, unsigned long long grantedQuotaInBytes) { ASSERT_NOT_REACHED(); }; virtual void didGrantStorageQuota(unsigned long long usageInBytes, unsigned long long grantedQuotaInBytes) { ASSERT_NOT_REACHED(); };
virtual void didFail(blink::WebStorageQuotaError) { ASSERT_NOT_REACHED(); }; virtual void didFail(WebStorageQuotaError) { ASSERT_NOT_REACHED(); };
}; };
} // namespace blink } // namespace blink
......
...@@ -284,12 +284,12 @@ public: ...@@ -284,12 +284,12 @@ public:
}; };
template<typename T> template<typename T>
struct ThreadingTrait<blink::SupplementBase<T, true> > { struct ThreadingTrait<SupplementBase<T, true> > {
static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity;
}; };
template<typename T> template<typename T>
struct ThreadingTrait<blink::SupplementableBase<T, true> > { struct ThreadingTrait<SupplementableBase<T, true> > {
static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity; static const ThreadAffinity Affinity = ThreadingTrait<T>::Affinity;
}; };
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
namespace blink { namespace blink {
class Task : public blink::WebThread::Task { class Task : public WebThread::Task {
public: public:
explicit Task(const Closure& closure) explicit Task(const Closure& closure)
: m_closure(closure) : m_closure(closure)
......
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
namespace blink { namespace blink {
class TestingDiscardableMemory : public blink::WebDiscardableMemory { class TestingDiscardableMemory : public WebDiscardableMemory {
public: public:
explicit TestingDiscardableMemory(size_t); explicit TestingDiscardableMemory(size_t);
virtual ~TestingDiscardableMemory(); virtual ~TestingDiscardableMemory();
// blink::WebDiscardableMemory: // WebDiscardableMemory:
virtual bool lock() OVERRIDE; virtual bool lock() OVERRIDE;
virtual void* data() OVERRIDE; virtual void* data() OVERRIDE;
virtual void unlock() OVERRIDE; virtual void unlock() OVERRIDE;
...@@ -52,7 +52,7 @@ private: ...@@ -52,7 +52,7 @@ private:
bool m_isLocked; bool m_isLocked;
}; };
class TestingPlatformSupport : public blink::Platform { class TestingPlatformSupport : public Platform {
public: public:
struct Config { struct Config {
Config() : hasDiscardableMemorySupport(false) { } Config() : hasDiscardableMemorySupport(false) { }
...@@ -64,14 +64,14 @@ public: ...@@ -64,14 +64,14 @@ public:
virtual ~TestingPlatformSupport(); virtual ~TestingPlatformSupport();
// blink::Platform: // Platform:
virtual blink::WebDiscardableMemory* allocateAndLockDiscardableMemory(size_t bytes) OVERRIDE; virtual WebDiscardableMemory* allocateAndLockDiscardableMemory(size_t bytes) OVERRIDE;
virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) OVERRIDE; virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) OVERRIDE;
virtual const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) OVERRIDE; virtual const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) OVERRIDE;
private: private:
const Config m_config; const Config m_config;
blink::Platform* const m_oldPlatform; Platform* const m_oldPlatform;
}; };
} // namespace blink } // namespace blink
......
...@@ -34,6 +34,6 @@ private: ...@@ -34,6 +34,6 @@ private:
}; };
#define FROM_HERE ::blink::TraceLocation(__FUNCTION__, __FILE__) #define FROM_HERE ::blink::TraceLocation(__FUNCTION__, __FILE__)
} } // namespace blink
#endif // TraceLocation_h #endif // TraceLocation_h
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