| Index: public/common/WebString.h
|
| diff --git a/public/platform/WebString.h b/public/common/WebString.h
|
| similarity index 73%
|
| copy from public/platform/WebString.h
|
| copy to public/common/WebString.h
|
| index 1d3b4024185ed0b14e02b0b4aa86dd1b165fba68..8c7e6497ce4529fd6e5ed098b9d3fae1d5e67605 100644
|
| --- a/public/platform/WebString.h
|
| +++ b/public/common/WebString.h
|
| @@ -31,26 +31,37 @@
|
| #ifndef WebString_h
|
| #define WebString_h
|
|
|
| -#include "WebCommon.h"
|
| +#include "WebCommonExport.h"
|
| #include "WebPrivatePtr.h"
|
|
|
| -#if WEBKIT_IMPLEMENTATION
|
| -#include <wtf/Forward.h>
|
| -#else
|
| +#if !defined(INSIDE_WEBKIT)
|
| #include <base/nullable_string16.h>
|
| #include <base/string16.h>
|
| #include <base/strings/latin1_string_conversions.h>
|
| #endif
|
|
|
| namespace WTF {
|
| +class AtomicString;
|
| +class String;
|
| class StringImpl;
|
| }
|
|
|
| namespace WebKit {
|
|
|
| +// UTF-16 character type
|
| +#if defined(WIN32)
|
| +typedef wchar_t WebUChar;
|
| +#else
|
| +typedef unsigned short WebUChar;
|
| +#endif
|
| +
|
| +// Latin-1 character type
|
| +typedef unsigned char WebLChar;
|
| +
|
| +
|
| class WebCString;
|
|
|
| -// A UTF-16 string container. It is inexpensive to copy a WebString
|
| +// A UTF-16 string container. It is inexpensive to copy a WebString
|
| // object.
|
| //
|
| // WARNING: It is not safe to pass a WebString across threads!!!
|
| @@ -74,24 +85,24 @@ public:
|
| return *this;
|
| }
|
|
|
| - WEBKIT_EXPORT void reset();
|
| - WEBKIT_EXPORT void assign(const WebString&);
|
| - WEBKIT_EXPORT void assign(const WebUChar* data, size_t len);
|
| + BLINK_COMMON_EXPORT void reset();
|
| + BLINK_COMMON_EXPORT void assign(const WebString&);
|
| + BLINK_COMMON_EXPORT void assign(const WebUChar* data, size_t len);
|
|
|
| - WEBKIT_EXPORT bool equals(const WebString& s) const;
|
| + BLINK_COMMON_EXPORT bool equals(const WebString&) const;
|
|
|
| - WEBKIT_EXPORT size_t length() const;
|
| + BLINK_COMMON_EXPORT size_t length() const;
|
|
|
| // Caller must check bounds.
|
| - WEBKIT_EXPORT WebUChar at(unsigned) const;
|
| + BLINK_COMMON_EXPORT WebUChar at(unsigned) const;
|
|
|
| bool isEmpty() const { return !length(); }
|
| bool isNull() const { return m_private.isNull(); }
|
|
|
| - WEBKIT_EXPORT WebCString utf8() const;
|
| + BLINK_COMMON_EXPORT WebCString utf8() const;
|
|
|
| - WEBKIT_EXPORT static WebString fromUTF8(const char* data, size_t length);
|
| - WEBKIT_EXPORT static WebString fromUTF8(const char* data);
|
| + BLINK_COMMON_EXPORT static WebString fromUTF8(const char* data, size_t length);
|
| + BLINK_COMMON_EXPORT static WebString fromUTF8(const char* data);
|
|
|
| template <int N> WebString(const char (&data)[N])
|
| {
|
| @@ -104,14 +115,14 @@ public:
|
| return *this;
|
| }
|
|
|
| -#if WEBKIT_IMPLEMENTATION
|
| - WebString(const WTF::String&);
|
| - WebString& operator=(const WTF::String&);
|
| - operator WTF::String() const;
|
| +#if defined(INSIDE_WEBKIT)
|
| + BLINK_COMMON_EXPORT WebString(const WTF::String&);
|
| + BLINK_COMMON_EXPORT WebString& operator=(const WTF::String&);
|
| + BLINK_COMMON_EXPORT operator WTF::String() const;
|
|
|
| - WebString(const WTF::AtomicString&);
|
| - WebString& operator=(const WTF::AtomicString&);
|
| - operator WTF::AtomicString() const;
|
| + BLINK_COMMON_EXPORT WebString(const WTF::AtomicString&);
|
| + BLINK_COMMON_EXPORT WebString& operator=(const WTF::AtomicString&);
|
| + BLINK_COMMON_EXPORT operator WTF::AtomicString() const;
|
| #else
|
|
|
| WebString(const string16& s)
|
| @@ -160,9 +171,9 @@ public:
|
| #endif
|
|
|
| private:
|
| - WEBKIT_EXPORT bool is8Bit() const;
|
| - WEBKIT_EXPORT const WebLChar* data8() const;
|
| - WEBKIT_EXPORT const WebUChar* data16() const;
|
| + BLINK_COMMON_EXPORT bool is8Bit() const;
|
| + BLINK_COMMON_EXPORT const WebLChar* data8() const;
|
| + BLINK_COMMON_EXPORT const WebUChar* data16() const;
|
|
|
| void assign(WTF::StringImpl*);
|
|
|
|
|