Cleanup namespace usage in Source/core/modules/[battery/* to indexeddb/*]

Cleanup namespace usage in Source/core/modules/[battery/* to indexeddb/*]

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

BUG=None

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

git-svn-id: svn://svn.chromium.org/blink/trunk@180106 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 044f0395
...@@ -11,20 +11,18 @@ ...@@ -11,20 +11,18 @@
#include "public/platform/WebBatteryStatusListener.h" #include "public/platform/WebBatteryStatusListener.h"
namespace blink { namespace blink {
class WebBatteryStatus;
}
namespace blink { class WebBatteryStatus;
class BatteryDispatcher FINAL : public PlatformEventDispatcher, public blink::WebBatteryStatusListener { class BatteryDispatcher FINAL : public PlatformEventDispatcher, public WebBatteryStatusListener {
public: public:
static BatteryDispatcher& instance(); static BatteryDispatcher& instance();
virtual ~BatteryDispatcher(); virtual ~BatteryDispatcher();
BatteryStatus* latestData(); BatteryStatus* latestData();
// Inherited from blink::WebBatteryStatusListener. // Inherited from WebBatteryStatusListener.
virtual void updateBatteryStatus(const blink::WebBatteryStatus&) OVERRIDE; virtual void updateBatteryStatus(const WebBatteryStatus&) OVERRIDE;
private: private:
BatteryDispatcher(); BatteryDispatcher();
...@@ -36,6 +34,6 @@ private: ...@@ -36,6 +34,6 @@ private:
RefPtrWillBePersistent<BatteryStatus> m_batteryStatus; RefPtrWillBePersistent<BatteryStatus> m_batteryStatus;
}; };
} } // namespace blink
#endif // BatteryDispatcher_h #endif // BatteryDispatcher_h
...@@ -14,7 +14,7 @@ namespace blink { ...@@ -14,7 +14,7 @@ namespace blink {
class DeviceLightController; class DeviceLightController;
// This class listens to device light data and notifies all registered controllers. // This class listens to device light data and notifies all registered controllers.
class DeviceLightDispatcher FINAL : public PlatformEventDispatcher, public blink::WebDeviceLightListener { class DeviceLightDispatcher FINAL : public PlatformEventDispatcher, public WebDeviceLightListener {
public: public:
static DeviceLightDispatcher& instance(); static DeviceLightDispatcher& instance();
......
...@@ -31,10 +31,8 @@ ...@@ -31,10 +31,8 @@
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
namespace blink { namespace blink {
class WebDeviceMotionData;
}
namespace blink { class WebDeviceMotionData;
class DeviceMotionData : public RefCountedWillBeGarbageCollected<DeviceMotionData> { class DeviceMotionData : public RefCountedWillBeGarbageCollected<DeviceMotionData> {
public: public:
...@@ -96,7 +94,7 @@ public: ...@@ -96,7 +94,7 @@ public:
PassRefPtrWillBeRawPtr<RotationRate>, PassRefPtrWillBeRawPtr<RotationRate>,
bool canProvideInterval, bool canProvideInterval,
double interval); double interval);
static PassRefPtrWillBeRawPtr<DeviceMotionData> create(const blink::WebDeviceMotionData&); static PassRefPtrWillBeRawPtr<DeviceMotionData> create(const WebDeviceMotionData&);
void trace(Visitor*); void trace(Visitor*);
Acceleration* acceleration() const { return m_acceleration.get(); } Acceleration* acceleration() const { return m_acceleration.get(); }
......
...@@ -36,17 +36,14 @@ ...@@ -36,17 +36,14 @@
#include "public/platform/WebDeviceMotionListener.h" #include "public/platform/WebDeviceMotionListener.h"
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
namespace blink {
class WebDeviceMotionData;
}
namespace blink { namespace blink {
class DeviceMotionController; class DeviceMotionController;
class DeviceMotionData; class DeviceMotionData;
class WebDeviceMotionData;
// This class listens to device motion data and notifies all registered controllers. // This class listens to device motion data and notifies all registered controllers.
class DeviceMotionDispatcher FINAL : public PlatformEventDispatcher, public blink::WebDeviceMotionListener { class DeviceMotionDispatcher FINAL : public PlatformEventDispatcher, public WebDeviceMotionListener {
public: public:
static DeviceMotionDispatcher& instance(); static DeviceMotionDispatcher& instance();
...@@ -55,7 +52,7 @@ public: ...@@ -55,7 +52,7 @@ public:
DeviceMotionData* latestDeviceMotionData(); DeviceMotionData* latestDeviceMotionData();
// Inherited from WebDeviceMotionListener. // Inherited from WebDeviceMotionListener.
virtual void didChangeDeviceMotion(const blink::WebDeviceMotionData&) OVERRIDE; virtual void didChangeDeviceMotion(const WebDeviceMotionData&) OVERRIDE;
private: private:
DeviceMotionDispatcher(); DeviceMotionDispatcher();
......
...@@ -30,16 +30,14 @@ ...@@ -30,16 +30,14 @@
#include "wtf/RefCounted.h" #include "wtf/RefCounted.h"
namespace blink { namespace blink {
class WebDeviceOrientationData;
}
namespace blink { class WebDeviceOrientationData;
class DeviceOrientationData : public RefCountedWillBeGarbageCollected<DeviceOrientationData> { class DeviceOrientationData : public RefCountedWillBeGarbageCollected<DeviceOrientationData> {
public: public:
static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(); static PassRefPtrWillBeRawPtr<DeviceOrientationData> create();
static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideAbsolute = false, bool absolute = false); static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma, bool canProvideAbsolute = false, bool absolute = false);
static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(const blink::WebDeviceOrientationData&); static PassRefPtrWillBeRawPtr<DeviceOrientationData> create(const WebDeviceOrientationData&);
void trace(Visitor*) { } void trace(Visitor*) { }
double alpha() const; double alpha() const;
......
...@@ -36,17 +36,14 @@ ...@@ -36,17 +36,14 @@
#include "public/platform/WebDeviceOrientationListener.h" #include "public/platform/WebDeviceOrientationListener.h"
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
namespace blink {
class WebDeviceOrientationData;
}
namespace blink { namespace blink {
class DeviceOrientationController; class DeviceOrientationController;
class DeviceOrientationData; class DeviceOrientationData;
class WebDeviceOrientationData;
// This class listens to device orientation data and notifies all registered controllers. // This class listens to device orientation data and notifies all registered controllers.
class DeviceOrientationDispatcher : public PlatformEventDispatcher, public blink::WebDeviceOrientationListener { class DeviceOrientationDispatcher : public PlatformEventDispatcher, public WebDeviceOrientationListener {
public: public:
static DeviceOrientationDispatcher& instance(); static DeviceOrientationDispatcher& instance();
...@@ -55,7 +52,7 @@ public: ...@@ -55,7 +52,7 @@ public:
DeviceOrientationData* latestDeviceOrientationData(); DeviceOrientationData* latestDeviceOrientationData();
// Inherited from WebDeviceOrientationListener. // Inherited from WebDeviceOrientationListener.
virtual void didChangeDeviceOrientation(const blink::WebDeviceOrientationData&) OVERRIDE; virtual void didChangeDeviceOrientation(const WebDeviceOrientationData&) OVERRIDE;
private: private:
DeviceOrientationDispatcher(); DeviceOrientationDispatcher();
......
...@@ -40,11 +40,11 @@ public: ...@@ -40,11 +40,11 @@ public:
DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(needkey); DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(needkey);
static void keyAdded(HTMLMediaElement&, const String& keySystem, const String& sessionId); static void keyAdded(HTMLMediaElement&, const String& keySystem, const String& sessionId);
static void keyError(HTMLMediaElement&, const String& keySystem, const String& sessionId, blink::WebMediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode); static void keyError(HTMLMediaElement&, const String& keySystem, const String& sessionId, WebMediaPlayerClient::MediaKeyErrorCode, unsigned short systemCode);
static void keyMessage(HTMLMediaElement&, const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const blink::WebURL& defaultURL); static void keyMessage(HTMLMediaElement&, const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const WebURL& defaultURL);
static void keyNeeded(HTMLMediaElement&, const String& contentType, const unsigned char* initData, unsigned initDataLength); static void keyNeeded(HTMLMediaElement&, const String& contentType, const unsigned char* initData, unsigned initDataLength);
static void playerDestroyed(HTMLMediaElement&); static void playerDestroyed(HTMLMediaElement&);
static blink::WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement&); static WebContentDecryptionModule* contentDecryptionModule(HTMLMediaElement&);
static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&); static HTMLMediaElementEncryptedMedia& from(HTMLMediaElement&);
static const char* supplementName(); static const char* supplementName();
...@@ -53,9 +53,9 @@ public: ...@@ -53,9 +53,9 @@ public:
private: private:
HTMLMediaElementEncryptedMedia(); HTMLMediaElementEncryptedMedia();
void generateKeyRequest(blink::WebMediaPlayer*, const String& keySystem, PassRefPtr<Uint8Array> initData, ExceptionState&); void generateKeyRequest(WebMediaPlayer*, const String& keySystem, PassRefPtr<Uint8Array> initData, ExceptionState&);
void addKey(blink::WebMediaPlayer*, const String& keySystem, PassRefPtr<Uint8Array> key, PassRefPtr<Uint8Array> initData, const String& sessionId, ExceptionState&); void addKey(WebMediaPlayer*, const String& keySystem, PassRefPtr<Uint8Array> key, PassRefPtr<Uint8Array> initData, const String& sessionId, ExceptionState&);
void cancelKeyRequest(blink::WebMediaPlayer*, const String& keySystem, const String& sessionId, ExceptionState&); void cancelKeyRequest(WebMediaPlayer*, const String& keySystem, const String& sessionId, ExceptionState&);
// EventTarget // EventTarget
bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<EventListener>); bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<EventListener>);
...@@ -71,7 +71,7 @@ private: ...@@ -71,7 +71,7 @@ private:
// (v0.1b or WD). Returns whether the mode is allowed and successfully set. // (v0.1b or WD). Returns whether the mode is allowed and successfully set.
bool setEmeMode(EmeMode, ExceptionState&); bool setEmeMode(EmeMode, ExceptionState&);
blink::WebContentDecryptionModule* contentDecryptionModule(); WebContentDecryptionModule* contentDecryptionModule();
void setMediaKeysInternal(HTMLMediaElement&, MediaKeys*); void setMediaKeysInternal(HTMLMediaElement&, MediaKeys*);
EmeMode m_emeMode; EmeMode m_emeMode;
...@@ -79,6 +79,6 @@ private: ...@@ -79,6 +79,6 @@ private:
PersistentWillBeMember<MediaKeys> m_mediaKeys; PersistentWillBeMember<MediaKeys> m_mediaKeys;
}; };
} } // namespace blink
#endif #endif
...@@ -35,11 +35,6 @@ ...@@ -35,11 +35,6 @@
#include "public/platform/WebContentDecryptionModuleSession.h" #include "public/platform/WebContentDecryptionModuleSession.h"
#include "wtf/Forward.h" #include "wtf/Forward.h"
namespace blink {
class WebContentDecryptionModule;
class WebString;
}
namespace blink { namespace blink {
class ScriptPromise; class ScriptPromise;
...@@ -47,6 +42,8 @@ class ScriptState; ...@@ -47,6 +42,8 @@ class ScriptState;
class GenericEventQueue; class GenericEventQueue;
class MediaKeyError; class MediaKeyError;
class MediaKeys; class MediaKeys;
class WebContentDecryptionModule;
class WebString;
// References are held by JS only. However, even if all JS references are // References are held by JS only. However, even if all JS references are
// dropped, it won't be garbage collected until close event received or // dropped, it won't be garbage collected until close event received or
...@@ -63,7 +60,7 @@ class MediaKeys; ...@@ -63,7 +60,7 @@ class MediaKeys;
// The WebContentDecryptionModuleSession has the same lifetime as this object. // The WebContentDecryptionModuleSession has the same lifetime as this object.
class MediaKeySession FINAL class MediaKeySession FINAL
: public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<MediaKeySession>, public ActiveDOMObject, public EventTargetWithInlineData : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<MediaKeySession>, public ActiveDOMObject, public EventTargetWithInlineData
, private blink::WebContentDecryptionModuleSession::Client { , private WebContentDecryptionModuleSession::Client {
DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<MediaKeySession>); DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<MediaKeySession>);
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession); WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeySession);
public: public:
...@@ -97,22 +94,22 @@ private: ...@@ -97,22 +94,22 @@ private:
class PendingAction; class PendingAction;
friend class MediaKeySessionInitializer; friend class MediaKeySessionInitializer;
MediaKeySession(ExecutionContext*, MediaKeys*, PassOwnPtr<blink::WebContentDecryptionModuleSession>); MediaKeySession(ExecutionContext*, MediaKeys*, PassOwnPtr<WebContentDecryptionModuleSession>);
void actionTimerFired(Timer<MediaKeySession>*); void actionTimerFired(Timer<MediaKeySession>*);
// blink::WebContentDecryptionModuleSession::Client // WebContentDecryptionModuleSession::Client
virtual void message(const unsigned char* message, size_t messageLength, const blink::WebURL& destinationURL) OVERRIDE; virtual void message(const unsigned char* message, size_t messageLength, const WebURL& destinationURL) OVERRIDE;
virtual void ready() OVERRIDE; virtual void ready() OVERRIDE;
virtual void close() OVERRIDE; virtual void close() OVERRIDE;
virtual void error(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE; virtual void error(MediaKeyErrorCode, unsigned long systemCode) OVERRIDE;
virtual void error(blink::WebContentDecryptionModuleException, unsigned long systemCode, const blink::WebString& errorMessage) OVERRIDE; virtual void error(WebContentDecryptionModuleException, unsigned long systemCode, const WebString& errorMessage) OVERRIDE;
ScriptPromise updateInternal(ScriptState*, PassRefPtr<ArrayBuffer> response); ScriptPromise updateInternal(ScriptState*, PassRefPtr<ArrayBuffer> response);
String m_keySystem; String m_keySystem;
RefPtrWillBeMember<MediaKeyError> m_error; RefPtrWillBeMember<MediaKeyError> m_error;
OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue; OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue;
OwnPtr<blink::WebContentDecryptionModuleSession> m_session; OwnPtr<WebContentDecryptionModuleSession> m_session;
// Used to determine if MediaKeys is still active. // Used to determine if MediaKeys is still active.
WeakMember<MediaKeys> m_keys; WeakMember<MediaKeys> m_keys;
...@@ -128,6 +125,6 @@ private: ...@@ -128,6 +125,6 @@ private:
Timer<MediaKeySession> m_actionTimer; Timer<MediaKeySession> m_actionTimer;
}; };
} } // namespace blink
#endif // MediaKeySession_h #endif // MediaKeySession_h
...@@ -8,18 +8,15 @@ ...@@ -8,18 +8,15 @@
#include "wtf/PassOwnPtr.h" #include "wtf/PassOwnPtr.h"
#include "wtf/text/WTFString.h" #include "wtf/text/WTFString.h"
namespace blink {
class WebContentDecryptionModule;
}
namespace blink { namespace blink {
class ExecutionContext; class ExecutionContext;
class Page; class Page;
class WebContentDecryptionModule;
class MediaKeysClient { class MediaKeysClient {
public: public:
virtual PassOwnPtr<blink::WebContentDecryptionModule> createContentDecryptionModule(ExecutionContext*, const String& keySystem) = 0; virtual PassOwnPtr<WebContentDecryptionModule> createContentDecryptionModule(ExecutionContext*, const String& keySystem) = 0;
protected: protected:
virtual ~MediaKeysClient() { } virtual ~MediaKeysClient() { }
......
...@@ -8,19 +8,16 @@ ...@@ -8,19 +8,16 @@
#include "core/page/Page.h" #include "core/page/Page.h"
#include "wtf/PassOwnPtr.h" #include "wtf/PassOwnPtr.h"
namespace blink {
class WebContentDecryptionModule;
}
namespace blink { namespace blink {
class ExecutionContext; class ExecutionContext;
class MediaKeysClient; class MediaKeysClient;
class WebContentDecryptionModule;
class MediaKeysController FINAL : public NoBaseWillBeGarbageCollected<MediaKeysController>, public WillBeHeapSupplement<Page> { class MediaKeysController FINAL : public NoBaseWillBeGarbageCollected<MediaKeysController>, public WillBeHeapSupplement<Page> {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeysController); WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaKeysController);
public: public:
PassOwnPtr<blink::WebContentDecryptionModule> createContentDecryptionModule(ExecutionContext*, const String& keySystem); PassOwnPtr<WebContentDecryptionModule> createContentDecryptionModule(ExecutionContext*, const String& keySystem);
static void provideMediaKeysTo(Page&, MediaKeysClient*); static void provideMediaKeysTo(Page&, MediaKeysClient*);
static MediaKeysController* from(Page* page) { return static_cast<MediaKeysController*>(WillBeHeapSupplement<Page>::from(page, supplementName())); } static MediaKeysController* from(Page* page) { return static_cast<MediaKeysController*>(WillBeHeapSupplement<Page>::from(page, supplementName())); }
......
...@@ -9,17 +9,14 @@ ...@@ -9,17 +9,14 @@
#include "platform/ContentDecryptionModuleResult.h" #include "platform/ContentDecryptionModuleResult.h"
#include "wtf/Forward.h" #include "wtf/Forward.h"
namespace blink {
class WebString;
}
namespace blink { namespace blink {
class ScriptPromise; class ScriptPromise;
class ScriptPromiseResolver; class ScriptPromiseResolver;
class ScriptState; class ScriptState;
class WebString;
ExceptionCode WebCdmExceptionToExceptionCode(blink::WebContentDecryptionModuleException); ExceptionCode WebCdmExceptionToExceptionCode(WebContentDecryptionModuleException);
// This class wraps the promise resolver and is passed (indirectly) to Chromium // This class wraps the promise resolver and is passed (indirectly) to Chromium
// to fullfill the promise. This implementation of complete() will resolve the // to fullfill the promise. This implementation of complete() will resolve the
...@@ -33,8 +30,8 @@ public: ...@@ -33,8 +30,8 @@ public:
// ContentDecryptionModuleResult implementation. // ContentDecryptionModuleResult implementation.
virtual void complete() OVERRIDE; virtual void complete() OVERRIDE;
virtual void completeWithSession(blink::WebContentDecryptionModuleResult::SessionStatus) OVERRIDE; virtual void completeWithSession(WebContentDecryptionModuleResult::SessionStatus) OVERRIDE;
virtual void completeWithError(blink::WebContentDecryptionModuleException, unsigned long systemCode, const blink::WebString&) OVERRIDE; virtual void completeWithError(WebContentDecryptionModuleException, unsigned long systemCode, const WebString&) OVERRIDE;
// It is only valid to call this before completion. // It is only valid to call this before completion.
ScriptPromise promise(); ScriptPromise promise();
......
...@@ -144,7 +144,7 @@ private: ...@@ -144,7 +144,7 @@ private:
class FileWriterBaseCallbacks FINAL : public FileSystemCallbacksBase { class FileWriterBaseCallbacks FINAL : public FileSystemCallbacksBase {
public: public:
static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*); static PassOwnPtr<AsyncFileSystemCallbacks> create(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*);
virtual void didCreateFileWriter(PassOwnPtr<blink::WebFileWriter>, long long length) OVERRIDE; virtual void didCreateFileWriter(PassOwnPtr<WebFileWriter>, long long length) OVERRIDE;
private: private:
FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*); FileWriterBaseCallbacks(PassRefPtrWillBeRawPtr<FileWriterBase>, PassOwnPtr<FileWriterBaseCallback>, PassOwnPtr<ErrorCallback>, ExecutionContext*);
...@@ -174,6 +174,6 @@ private: ...@@ -174,6 +174,6 @@ private:
OwnPtr<VoidCallback> m_successCallback; OwnPtr<VoidCallback> m_successCallback;
}; };
} // namespace } // namespace blink
#endif // FileSystemCallbacks_h #endif // FileSystemCallbacks_h
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
virtual ~FileSystemClient() { } virtual ~FileSystemClient() { }
virtual bool requestFileSystemAccessSync(ExecutionContext*) = 0; virtual bool requestFileSystemAccessSync(ExecutionContext*) = 0;
virtual void requestFileSystemAccessAsync(ExecutionContext*, PassOwnPtr<blink::PermissionCallbacks>) = 0; virtual void requestFileSystemAccessAsync(ExecutionContext*, PassOwnPtr<PermissionCallbacks>) = 0;
}; };
void provideLocalFileSystemTo(LocalFrame&, PassOwnPtr<FileSystemClient>); void provideLocalFileSystemTo(LocalFrame&, PassOwnPtr<FileSystemClient>);
......
...@@ -46,7 +46,7 @@ class Blob; ...@@ -46,7 +46,7 @@ class Blob;
class ExceptionState; class ExceptionState;
class ExecutionContext; class ExecutionContext;
class FileWriter FINAL : public FileWriterBase, public ActiveDOMObject, public EventTargetWithInlineData, public blink::WebFileWriterClient { class FileWriter FINAL : public FileWriterBase, public ActiveDOMObject, public EventTargetWithInlineData, public WebFileWriterClient {
DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<FileWriterBase>); DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<FileWriterBase>);
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FileWriter); WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(FileWriter);
public: public:
...@@ -68,7 +68,7 @@ public: ...@@ -68,7 +68,7 @@ public:
// WebFileWriterClient // WebFileWriterClient
virtual void didWrite(long long bytes, bool complete) OVERRIDE; virtual void didWrite(long long bytes, bool complete) OVERRIDE;
virtual void didTruncate() OVERRIDE; virtual void didTruncate() OVERRIDE;
virtual void didFail(blink::WebFileError) OVERRIDE; virtual void didFail(WebFileError) OVERRIDE;
// ActiveDOMObject // ActiveDOMObject
virtual void stop() OVERRIDE; virtual void stop() OVERRIDE;
......
...@@ -35,14 +35,14 @@ ...@@ -35,14 +35,14 @@
#include "wtf/OwnPtr.h" #include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h" #include "wtf/PassOwnPtr.h"
namespace blink { class WebFileWriter; }
namespace blink { namespace blink {
class WebFileWriter;
class FileWriterBase : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<FileWriterBase> { class FileWriterBase : public RefCountedGarbageCollectedWillBeGarbageCollectedFinalized<FileWriterBase> {
public: public:
virtual ~FileWriterBase(); virtual ~FileWriterBase();
void initialize(PassOwnPtr<blink::WebFileWriter>, long long length); void initialize(PassOwnPtr<WebFileWriter>, long long length);
long long position() const long long position() const
{ {
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
protected: protected:
FileWriterBase(); FileWriterBase();
blink::WebFileWriter* writer() WebFileWriter* writer()
{ {
return m_writer.get(); return m_writer.get();
} }
...@@ -78,7 +78,7 @@ protected: ...@@ -78,7 +78,7 @@ protected:
private: private:
friend class WTF::RefCounted<FileWriterBase>; friend class WTF::RefCounted<FileWriterBase>;
OwnPtr<blink::WebFileWriter> m_writer; OwnPtr<WebFileWriter> m_writer;
long long m_position; long long m_position;
long long m_length; long long m_length;
}; };
......
...@@ -42,7 +42,7 @@ namespace blink { ...@@ -42,7 +42,7 @@ namespace blink {
class Blob; class Blob;
class ExceptionState; class ExceptionState;
class FileWriterSync FINAL : public FileWriterBase, public ScriptWrappable, public blink::WebFileWriterClient { class FileWriterSync FINAL : public FileWriterBase, public ScriptWrappable, public WebFileWriterClient {
public: public:
static FileWriterSync* create() static FileWriterSync* create()
{ {
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
// WebFileWriterClient, via FileWriterBase // WebFileWriterClient, via FileWriterBase
virtual void didWrite(long long bytes, bool complete) OVERRIDE; virtual void didWrite(long long bytes, bool complete) OVERRIDE;
virtual void didTruncate() OVERRIDE; virtual void didTruncate() OVERRIDE;
virtual void didFail(blink::WebFileError) OVERRIDE; virtual void didFail(WebFileError) OVERRIDE;
private: private:
FileWriterSync(); FileWriterSync();
......
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
~Gamepad(); ~Gamepad();
const GamepadButtonVector& buttons() const { return m_buttons; } const GamepadButtonVector& buttons() const { return m_buttons; }
void setButtons(unsigned count, const blink::WebGamepadButton* data); void setButtons(unsigned count, const WebGamepadButton* data);
void trace(Visitor*); void trace(Visitor*);
......
...@@ -10,22 +10,19 @@ ...@@ -10,22 +10,19 @@
#include "public/platform/WebGamepad.h" #include "public/platform/WebGamepad.h"
#include "public/platform/WebGamepadListener.h" #include "public/platform/WebGamepadListener.h"
namespace blink {
class WebGamepads;
}
namespace blink { namespace blink {
class NavigatorGamepad; class NavigatorGamepad;
class WebGamepads;
class GamepadDispatcher : public PlatformEventDispatcher, public blink::WebGamepadListener { class GamepadDispatcher : public PlatformEventDispatcher, public WebGamepadListener {
public: public:
static GamepadDispatcher& instance(); static GamepadDispatcher& instance();
void sampleGamepads(blink::WebGamepads&); void sampleGamepads(WebGamepads&);
struct ConnectionChange { struct ConnectionChange {
blink::WebGamepad pad; WebGamepad pad;
unsigned index; unsigned index;
}; };
...@@ -36,14 +33,14 @@ private: ...@@ -36,14 +33,14 @@ private:
virtual ~GamepadDispatcher(); virtual ~GamepadDispatcher();
// WebGamepadListener // WebGamepadListener
virtual void didConnectGamepad(unsigned index, const blink::WebGamepad&) OVERRIDE; virtual void didConnectGamepad(unsigned index, const WebGamepad&) OVERRIDE;
virtual void didDisconnectGamepad(unsigned index, const blink::WebGamepad&) OVERRIDE; virtual void didDisconnectGamepad(unsigned index, const WebGamepad&) OVERRIDE;
// PlatformEventDispatcher // PlatformEventDispatcher
virtual void startListening() OVERRIDE; virtual void startListening() OVERRIDE;
virtual void stopListening() OVERRIDE; virtual void stopListening() OVERRIDE;
void dispatchDidConnectOrDisconnectGamepad(unsigned index, const blink::WebGamepad&, bool connected); void dispatchDidConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool connected);
ConnectionChange m_latestChange; ConnectionChange m_latestChange;
}; };
......
...@@ -42,13 +42,13 @@ public: ...@@ -42,13 +42,13 @@ public:
void set(unsigned index, Gamepad*); void set(unsigned index, Gamepad*);
Gamepad* item(unsigned index); Gamepad* item(unsigned index);
unsigned length() const { return blink::WebGamepads::itemsLengthCap; } unsigned length() const { return WebGamepads::itemsLengthCap; }
void trace(Visitor*); void trace(Visitor*);
private: private:
GamepadList(); GamepadList();
Member<Gamepad> m_items[blink::WebGamepads::itemsLengthCap]; Member<Gamepad> m_items[WebGamepads::itemsLengthCap];
}; };
} // namespace blink } // namespace blink
......
...@@ -34,15 +34,11 @@ ...@@ -34,15 +34,11 @@
#include "platform/heap/Handle.h" #include "platform/heap/Handle.h"
#include "public/platform/WebGamepads.h" #include "public/platform/WebGamepads.h"
namespace blink {
class WebGamepad;
class WebGamepads;
}
namespace blink { namespace blink {
class Document; class Document;
class Gamepad; class Gamepad;
class Gamepads;
class GamepadList; class GamepadList;
class Navigator; class Navigator;
class WebKitGamepadList; class WebKitGamepadList;
...@@ -62,7 +58,7 @@ public: ...@@ -62,7 +58,7 @@ public:
virtual void trace(Visitor*); virtual void trace(Visitor*);
void didConnectOrDisconnectGamepad(unsigned index, const blink::WebGamepad&, bool connected); void didConnectOrDisconnectGamepad(unsigned index, const WebGamepad&, bool connected);
private: private:
explicit NavigatorGamepad(LocalFrame*); explicit NavigatorGamepad(LocalFrame*);
......
...@@ -23,7 +23,7 @@ public: ...@@ -23,7 +23,7 @@ public:
typedef Vector<float> FloatVector; typedef Vector<float> FloatVector;
const FloatVector& buttons() const { return m_buttons; } const FloatVector& buttons() const { return m_buttons; }
void setButtons(unsigned count, const blink::WebGamepadButton* data); void setButtons(unsigned count, const WebGamepadButton* data);
void trace(Visitor*) { } void trace(Visitor*) { }
......
...@@ -21,13 +21,13 @@ public: ...@@ -21,13 +21,13 @@ public:
void set(unsigned index, WebKitGamepad*); void set(unsigned index, WebKitGamepad*);
WebKitGamepad* item(unsigned index); WebKitGamepad* item(unsigned index);
unsigned length() const { return blink::WebGamepads::itemsLengthCap; } unsigned length() const { return WebGamepads::itemsLengthCap; }
void trace(Visitor*); void trace(Visitor*);
private: private:
WebKitGamepadList(); WebKitGamepadList();
Member<WebKitGamepad> m_items[blink::WebGamepads::itemsLengthCap]; Member<WebKitGamepad> m_items[WebGamepads::itemsLengthCap];
}; };
} // namespace blink } // namespace blink
......
...@@ -35,12 +35,6 @@ ...@@ -35,12 +35,6 @@
namespace blink { namespace blink {
class WebBlobInfo;
}
namespace blink {
class DOMStringList; class DOMStringList;
class IDBCursor; class IDBCursor;
class IDBCursorWithValue; class IDBCursorWithValue;
...@@ -49,6 +43,7 @@ class IDBIndex; ...@@ -49,6 +43,7 @@ class IDBIndex;
class IDBKeyPath; class IDBKeyPath;
class IDBObjectStore; class IDBObjectStore;
class IDBTransaction; class IDBTransaction;
class WebBlobInfo;
class IDBAny : public GarbageCollectedFinalized<IDBAny> { class IDBAny : public GarbageCollectedFinalized<IDBAny> {
public: public:
...@@ -65,7 +60,7 @@ public: ...@@ -65,7 +60,7 @@ public:
{ {
return new IDBAny(idbObject); return new IDBAny(idbObject);
} }
static IDBAny* create(PassRefPtr<SharedBuffer> value, const Vector<blink::WebBlobInfo>* blobInfo) static IDBAny* create(PassRefPtr<SharedBuffer> value, const Vector<WebBlobInfo>* blobInfo)
{ {
return new IDBAny(value, blobInfo); return new IDBAny(value, blobInfo);
} }
...@@ -78,7 +73,7 @@ public: ...@@ -78,7 +73,7 @@ public:
{ {
return new IDBAny(value); return new IDBAny(value);
} }
static IDBAny* create(PassRefPtr<SharedBuffer> value, const Vector<blink::WebBlobInfo>* blobInfo, IDBKey* key, const IDBKeyPath& keyPath) static IDBAny* create(PassRefPtr<SharedBuffer> value, const Vector<WebBlobInfo>* blobInfo, IDBKey* key, const IDBKeyPath& keyPath)
{ {
return new IDBAny(value, blobInfo, key, keyPath); return new IDBAny(value, blobInfo, key, keyPath);
} }
...@@ -114,7 +109,7 @@ public: ...@@ -114,7 +109,7 @@ public:
IDBObjectStore* idbObjectStore() const; IDBObjectStore* idbObjectStore() const;
IDBTransaction* idbTransaction() const; IDBTransaction* idbTransaction() const;
SharedBuffer* buffer() const; SharedBuffer* buffer() const;
const Vector<blink::WebBlobInfo>* blobInfo() const; const Vector<WebBlobInfo>* blobInfo() const;
int64_t integer() const; int64_t integer() const;
const String& string() const; const String& string() const;
const IDBKey* key() const; const IDBKey* key() const;
...@@ -131,8 +126,8 @@ private: ...@@ -131,8 +126,8 @@ private:
explicit IDBAny(IDBKey*); explicit IDBAny(IDBKey*);
explicit IDBAny(const IDBKeyPath&); explicit IDBAny(const IDBKeyPath&);
explicit IDBAny(const String&); explicit IDBAny(const String&);
IDBAny(PassRefPtr<SharedBuffer>, const Vector<blink::WebBlobInfo>*); IDBAny(PassRefPtr<SharedBuffer>, const Vector<WebBlobInfo>*);
IDBAny(PassRefPtr<SharedBuffer>, const Vector<blink::WebBlobInfo>*, IDBKey*, const IDBKeyPath&); IDBAny(PassRefPtr<SharedBuffer>, const Vector<WebBlobInfo>*, IDBKey*, const IDBKeyPath&);
explicit IDBAny(int64_t); explicit IDBAny(int64_t);
const Type m_type; const Type m_type;
...@@ -147,7 +142,7 @@ private: ...@@ -147,7 +142,7 @@ private:
const Member<IDBKey> m_idbKey; const Member<IDBKey> m_idbKey;
const IDBKeyPath m_idbKeyPath; const IDBKeyPath m_idbKeyPath;
const RefPtr<SharedBuffer> m_buffer; const RefPtr<SharedBuffer> m_buffer;
const Vector<blink::WebBlobInfo>* m_blobInfo; const Vector<WebBlobInfo>* m_blobInfo;
const String m_string; const String m_string;
const int64_t m_integer; const int64_t m_integer;
}; };
......
...@@ -38,17 +38,12 @@ ...@@ -38,17 +38,12 @@
namespace blink { namespace blink {
class WebBlobInfo;
} // namespace blink
namespace blink {
class ExceptionState; class ExceptionState;
class IDBAny; class IDBAny;
class IDBTransaction; class IDBTransaction;
class ExecutionContext; class ExecutionContext;
class SharedBuffer; class SharedBuffer;
class WebBlobInfo;
class IDBCursor : public GarbageCollectedFinalized<IDBCursor>, public ScriptWrappable { class IDBCursor : public GarbageCollectedFinalized<IDBCursor>, public ScriptWrappable {
public: public:
...@@ -57,10 +52,10 @@ public: ...@@ -57,10 +52,10 @@ public:
static const AtomicString& directionPrev(); static const AtomicString& directionPrev();
static const AtomicString& directionPrevUnique(); static const AtomicString& directionPrevUnique();
static blink::WebIDBCursorDirection stringToDirection(const String& modeString, ExceptionState&); static WebIDBCursorDirection stringToDirection(const String& modeString, ExceptionState&);
static const AtomicString& directionToString(unsigned short mode); static const AtomicString& directionToString(unsigned short mode);
static IDBCursor* create(PassOwnPtr<blink::WebIDBCursor>, blink::WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*); static IDBCursor* create(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
virtual ~IDBCursor(); virtual ~IDBCursor();
void trace(Visitor*); void trace(Visitor*);
void contextWillBeDestroyed() { m_backend.clear(); } void contextWillBeDestroyed() { m_backend.clear(); }
...@@ -86,22 +81,22 @@ public: ...@@ -86,22 +81,22 @@ public:
void postSuccessHandlerCallback(); void postSuccessHandlerCallback();
bool isDeleted() const; bool isDeleted() const;
void close(); void close();
void setValueReady(IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer> value, PassOwnPtr<Vector<blink::WebBlobInfo> >); void setValueReady(IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer> value, PassOwnPtr<Vector<WebBlobInfo> >);
IDBKey* idbPrimaryKey() const { return m_primaryKey; } IDBKey* idbPrimaryKey() const { return m_primaryKey; }
IDBRequest* request() const { return m_request.get(); } IDBRequest* request() const { return m_request.get(); }
virtual bool isKeyCursor() const { return true; } virtual bool isKeyCursor() const { return true; }
virtual bool isCursorWithValue() const { return false; } virtual bool isCursorWithValue() const { return false; }
protected: protected:
IDBCursor(PassOwnPtr<blink::WebIDBCursor>, blink::WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*); IDBCursor(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
private: private:
IDBObjectStore* effectiveObjectStore() const; IDBObjectStore* effectiveObjectStore() const;
void handleBlobAcks(); void handleBlobAcks();
OwnPtr<blink::WebIDBCursor> m_backend; OwnPtr<WebIDBCursor> m_backend;
Member<IDBRequest> m_request; Member<IDBRequest> m_request;
const blink::WebIDBCursorDirection m_direction; const WebIDBCursorDirection m_direction;
Member<IDBAny> m_source; Member<IDBAny> m_source;
Member<IDBTransaction> m_transaction; Member<IDBTransaction> m_transaction;
bool m_gotValue; bool m_gotValue;
...@@ -111,7 +106,7 @@ private: ...@@ -111,7 +106,7 @@ private:
Member<IDBKey> m_key; Member<IDBKey> m_key;
Member<IDBKey> m_primaryKey; Member<IDBKey> m_primaryKey;
RefPtr<SharedBuffer> m_value; RefPtr<SharedBuffer> m_value;
OwnPtr<Vector<blink::WebBlobInfo> > m_blobInfo; OwnPtr<Vector<WebBlobInfo> > m_blobInfo;
}; };
} // namespace blink } // namespace blink
......
...@@ -40,7 +40,7 @@ class IDBTransaction; ...@@ -40,7 +40,7 @@ class IDBTransaction;
class IDBCursorWithValue FINAL : public IDBCursor { class IDBCursorWithValue FINAL : public IDBCursor {
public: public:
static IDBCursorWithValue* create(PassOwnPtr<blink::WebIDBCursor>, blink::WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*); static IDBCursorWithValue* create(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
virtual ~IDBCursorWithValue(); virtual ~IDBCursorWithValue();
// The value attribute defined in the IDL is simply implemented in IDBCursor (but not exposed via // The value attribute defined in the IDL is simply implemented in IDBCursor (but not exposed via
...@@ -50,7 +50,7 @@ public: ...@@ -50,7 +50,7 @@ public:
virtual bool isCursorWithValue() const OVERRIDE { return true; } virtual bool isCursorWithValue() const OVERRIDE { return true; }
private: private:
IDBCursorWithValue(PassOwnPtr<blink::WebIDBCursor>, blink::WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*); IDBCursorWithValue(PassOwnPtr<WebIDBCursor>, WebIDBCursorDirection, IDBRequest*, IDBAny* source, IDBTransaction*);
}; };
DEFINE_TYPE_CASTS(IDBCursorWithValue, IDBCursor, cursor, cursor->isCursorWithValue(), cursor.isCursorWithValue()); DEFINE_TYPE_CASTS(IDBCursorWithValue, IDBCursor, cursor, cursor->isCursorWithValue(), cursor.isCursorWithValue());
......
...@@ -56,7 +56,7 @@ class IDBDatabase FINAL ...@@ -56,7 +56,7 @@ class IDBDatabase FINAL
DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<IDBDatabase>); DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<IDBDatabase>);
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBDatabase); WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBDatabase);
public: public:
static IDBDatabase* create(ExecutionContext*, PassOwnPtr<blink::WebIDBDatabase>, IDBDatabaseCallbacks*); static IDBDatabase* create(ExecutionContext*, PassOwnPtr<WebIDBDatabase>, IDBDatabaseCallbacks*);
virtual ~IDBDatabase(); virtual ~IDBDatabase();
virtual void trace(Visitor*) OVERRIDE; virtual void trace(Visitor*) OVERRIDE;
...@@ -112,11 +112,11 @@ public: ...@@ -112,11 +112,11 @@ public:
} }
// Will return nullptr if this database is stopped. // Will return nullptr if this database is stopped.
blink::WebIDBDatabase* backend() const { return m_backend.get(); } WebIDBDatabase* backend() const { return m_backend.get(); }
static int64_t nextTransactionId(); static int64_t nextTransactionId();
void ackReceivedBlobs(const Vector<blink::WebBlobInfo>*); void ackReceivedBlobs(const Vector<WebBlobInfo>*);
static const char indexDeletedErrorMessage[]; static const char indexDeletedErrorMessage[];
static const char isKeyCursorErrorMessage[]; static const char isKeyCursorErrorMessage[];
...@@ -135,12 +135,12 @@ public: ...@@ -135,12 +135,12 @@ public:
static const char databaseClosedErrorMessage[]; static const char databaseClosedErrorMessage[];
private: private:
IDBDatabase(ExecutionContext*, PassOwnPtr<blink::WebIDBDatabase>, IDBDatabaseCallbacks*); IDBDatabase(ExecutionContext*, PassOwnPtr<WebIDBDatabase>, IDBDatabaseCallbacks*);
void closeConnection(); void closeConnection();
IDBDatabaseMetadata m_metadata; IDBDatabaseMetadata m_metadata;
OwnPtr<blink::WebIDBDatabase> m_backend; OwnPtr<WebIDBDatabase> m_backend;
Member<IDBTransaction> m_versionChangeTransaction; Member<IDBTransaction> m_versionChangeTransaction;
typedef HeapHashMap<int64_t, Member<IDBTransaction> > TransactionMap; typedef HeapHashMap<int64_t, Member<IDBTransaction> > TransactionMap;
TransactionMap m_transactions; TransactionMap m_transactions;
......
...@@ -69,9 +69,9 @@ public: ...@@ -69,9 +69,9 @@ public:
bool isDeleted() const; bool isDeleted() const;
// Used internally and by InspectorIndexedDBAgent: // Used internally and by InspectorIndexedDBAgent:
IDBRequest* openCursor(ScriptState*, IDBKeyRange*, blink::WebIDBCursorDirection); IDBRequest* openCursor(ScriptState*, IDBKeyRange*, WebIDBCursorDirection);
blink::WebIDBDatabase* backendDB() const; WebIDBDatabase* backendDB() const;
private: private:
IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*); IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*);
......
...@@ -88,10 +88,10 @@ public: ...@@ -88,10 +88,10 @@ public:
IDBRequest* count(ScriptState*, const ScriptValue& range, ExceptionState&); IDBRequest* count(ScriptState*, const ScriptValue& range, ExceptionState&);
// Used by IDBCursor::update(): // Used by IDBCursor::update():
IDBRequest* put(ScriptState*, blink::WebIDBPutMode, IDBAny* source, ScriptValue&, IDBKey*, ExceptionState&); IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, ScriptValue&, IDBKey*, ExceptionState&);
// Used internally and by InspectorIndexedDBAgent: // Used internally and by InspectorIndexedDBAgent:
IDBRequest* openCursor(ScriptState*, IDBKeyRange*, blink::WebIDBCursorDirection, blink::WebIDBTaskType = blink::WebIDBTaskTypeNormal); IDBRequest* openCursor(ScriptState*, IDBKeyRange*, WebIDBCursorDirection, WebIDBTaskType = WebIDBTaskTypeNormal);
void markDeleted() { m_deleted = true; } void markDeleted() { m_deleted = true; }
bool isDeleted() const { return m_deleted; } bool isDeleted() const { return m_deleted; }
...@@ -102,14 +102,14 @@ public: ...@@ -102,14 +102,14 @@ public:
typedef HeapVector<Member<IDBKey> > IndexKeys; typedef HeapVector<Member<IDBKey> > IndexKeys;
blink::WebIDBDatabase* backendDB() const; WebIDBDatabase* backendDB() const;
private: private:
IDBObjectStore(const IDBObjectStoreMetadata&, IDBTransaction*); IDBObjectStore(const IDBObjectStoreMetadata&, IDBTransaction*);
IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, const Dictionary&, ExceptionState&); IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, const Dictionary&, ExceptionState&);
IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry, ExceptionState&); IDBIndex* createIndex(ScriptState*, const String& name, const IDBKeyPath&, bool unique, bool multiEntry, ExceptionState&);
IDBRequest* put(ScriptState*, blink::WebIDBPutMode, IDBAny* source, ScriptValue&, const ScriptValue& key, ExceptionState&); IDBRequest* put(ScriptState*, WebIDBPutMode, IDBAny* source, ScriptValue&, const ScriptValue& key, ExceptionState&);
int64_t findIndexId(const String& name) const; int64_t findIndexId(const String& name) const;
bool containsIndex(const String& name) const bool containsIndex(const String& name) const
......
...@@ -42,8 +42,8 @@ public: ...@@ -42,8 +42,8 @@ public:
using IDBRequest::onSuccess; using IDBRequest::onSuccess;
virtual void onBlocked(int64_t existingVersion) OVERRIDE; virtual void onBlocked(int64_t existingVersion) OVERRIDE;
virtual void onUpgradeNeeded(int64_t oldVersion, PassOwnPtr<blink::WebIDBDatabase>, const IDBDatabaseMetadata&, blink::WebIDBDataLoss, String dataLossMessage) OVERRIDE; virtual void onUpgradeNeeded(int64_t oldVersion, PassOwnPtr<WebIDBDatabase>, const IDBDatabaseMetadata&, WebIDBDataLoss, String dataLossMessage) OVERRIDE;
virtual void onSuccess(PassOwnPtr<blink::WebIDBDatabase>, const IDBDatabaseMetadata&) OVERRIDE; virtual void onSuccess(PassOwnPtr<WebIDBDatabase>, const IDBDatabaseMetadata&) OVERRIDE;
virtual void onSuccess(int64_t oldVersion) OVERRIDE; virtual void onSuccess(int64_t oldVersion) OVERRIDE;
// EventTarget // EventTarget
......
...@@ -87,24 +87,24 @@ public: ...@@ -87,24 +87,24 @@ public:
DEFINE_ATTRIBUTE_EVENT_LISTENER(success); DEFINE_ATTRIBUTE_EVENT_LISTENER(success);
DEFINE_ATTRIBUTE_EVENT_LISTENER(error); DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
void setCursorDetails(IndexedDB::CursorType, blink::WebIDBCursorDirection); void setCursorDetails(IndexedDB::CursorType, WebIDBCursorDirection);
void setPendingCursor(IDBCursor*); void setPendingCursor(IDBCursor*);
void abort(); void abort();
virtual void onError(PassRefPtrWillBeRawPtr<DOMError>); virtual void onError(PassRefPtrWillBeRawPtr<DOMError>);
virtual void onSuccess(const Vector<String>&); virtual void onSuccess(const Vector<String>&);
virtual void onSuccess(PassOwnPtr<blink::WebIDBCursor>, IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::WebBlobInfo> >); virtual void onSuccess(PassOwnPtr<WebIDBCursor>, IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<WebBlobInfo> >);
virtual void onSuccess(IDBKey*); virtual void onSuccess(IDBKey*);
virtual void onSuccess(PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::WebBlobInfo> >); virtual void onSuccess(PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<WebBlobInfo> >);
virtual void onSuccess(PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::WebBlobInfo> >, IDBKey*, const IDBKeyPath&); virtual void onSuccess(PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<WebBlobInfo> >, IDBKey*, const IDBKeyPath&);
virtual void onSuccess(int64_t); virtual void onSuccess(int64_t);
virtual void onSuccess(); virtual void onSuccess();
virtual void onSuccess(IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<blink::WebBlobInfo> >); virtual void onSuccess(IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer>, PassOwnPtr<Vector<WebBlobInfo> >);
// Only IDBOpenDBRequest instances should receive these: // Only IDBOpenDBRequest instances should receive these:
virtual void onBlocked(int64_t oldVersion) { ASSERT_NOT_REACHED(); } virtual void onBlocked(int64_t oldVersion) { ASSERT_NOT_REACHED(); }
virtual void onUpgradeNeeded(int64_t oldVersion, PassOwnPtr<blink::WebIDBDatabase>, const IDBDatabaseMetadata&, blink::WebIDBDataLoss, String dataLossMessage) { ASSERT_NOT_REACHED(); } virtual void onUpgradeNeeded(int64_t oldVersion, PassOwnPtr<WebIDBDatabase>, const IDBDatabaseMetadata&, WebIDBDataLoss, String dataLossMessage) { ASSERT_NOT_REACHED(); }
virtual void onSuccess(PassOwnPtr<blink::WebIDBDatabase>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); } virtual void onSuccess(PassOwnPtr<WebIDBDatabase>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); }
// ActiveDOMObject // ActiveDOMObject
virtual bool hasPendingActivity() const OVERRIDE FINAL; virtual bool hasPendingActivity() const OVERRIDE FINAL;
...@@ -139,7 +139,7 @@ protected: ...@@ -139,7 +139,7 @@ protected:
bool m_requestAborted; // May be aborted by transaction then receive async onsuccess; ignore vs. assert. bool m_requestAborted; // May be aborted by transaction then receive async onsuccess; ignore vs. assert.
private: private:
void setResultCursor(IDBCursor*, IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer> value, PassOwnPtr<Vector<blink::WebBlobInfo> >); void setResultCursor(IDBCursor*, IDBKey*, IDBKey* primaryKey, PassRefPtr<SharedBuffer> value, PassOwnPtr<Vector<WebBlobInfo> >);
void handleBlobAcks(); void handleBlobAcks();
RefPtr<ScriptState> m_scriptState; RefPtr<ScriptState> m_scriptState;
...@@ -152,14 +152,14 @@ private: ...@@ -152,14 +152,14 @@ private:
// Only used if the result type will be a cursor. // Only used if the result type will be a cursor.
IndexedDB::CursorType m_cursorType; IndexedDB::CursorType m_cursorType;
blink::WebIDBCursorDirection m_cursorDirection; WebIDBCursorDirection m_cursorDirection;
// When a cursor is continued/advanced, m_result is cleared and m_pendingCursor holds it. // When a cursor is continued/advanced, m_result is cleared and m_pendingCursor holds it.
Member<IDBCursor> m_pendingCursor; Member<IDBCursor> m_pendingCursor;
// New state is not applied to the cursor object until the event is dispatched. // New state is not applied to the cursor object until the event is dispatched.
Member<IDBKey> m_cursorKey; Member<IDBKey> m_cursorKey;
Member<IDBKey> m_cursorPrimaryKey; Member<IDBKey> m_cursorPrimaryKey;
RefPtr<SharedBuffer> m_cursorValue; RefPtr<SharedBuffer> m_cursorValue;
OwnPtr<Vector<blink::WebBlobInfo> > m_blobInfo; OwnPtr<Vector<WebBlobInfo> > m_blobInfo;
bool m_didFireUpgradeNeededEvent; bool m_didFireUpgradeNeededEvent;
bool m_preventPropagation; bool m_preventPropagation;
......
...@@ -55,7 +55,7 @@ class IDBTransaction FINAL ...@@ -55,7 +55,7 @@ class IDBTransaction FINAL
DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<IDBTransaction>); DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<IDBTransaction>);
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBTransaction); WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBTransaction);
public: public:
static IDBTransaction* create(ExecutionContext*, int64_t, const Vector<String>& objectStoreNames, blink::WebIDBTransactionMode, IDBDatabase*); static IDBTransaction* create(ExecutionContext*, int64_t, const Vector<String>& objectStoreNames, WebIDBTransactionMode, IDBDatabase*);
static IDBTransaction* create(ExecutionContext*, int64_t, IDBDatabase*, IDBOpenDBRequest*, const IDBDatabaseMetadata& previousMetadata); static IDBTransaction* create(ExecutionContext*, int64_t, IDBDatabase*, IDBOpenDBRequest*, const IDBDatabaseMetadata& previousMetadata);
virtual ~IDBTransaction(); virtual ~IDBTransaction();
virtual void trace(Visitor*) OVERRIDE; virtual void trace(Visitor*) OVERRIDE;
...@@ -64,18 +64,18 @@ public: ...@@ -64,18 +64,18 @@ public:
static const AtomicString& modeReadWrite(); static const AtomicString& modeReadWrite();
static const AtomicString& modeVersionChange(); static const AtomicString& modeVersionChange();
static blink::WebIDBTransactionMode stringToMode(const String&, ExceptionState&); static WebIDBTransactionMode stringToMode(const String&, ExceptionState&);
static const AtomicString& modeToString(blink::WebIDBTransactionMode); static const AtomicString& modeToString(WebIDBTransactionMode);
// When the connection is closed backend will be 0. // When the connection is closed backend will be 0.
blink::WebIDBDatabase* backendDB() const; WebIDBDatabase* backendDB() const;
int64_t id() const { return m_id; } int64_t id() const { return m_id; }
bool isActive() const { return m_state == Active; } bool isActive() const { return m_state == Active; }
bool isFinished() const { return m_state == Finished; } bool isFinished() const { return m_state == Finished; }
bool isFinishing() const { return m_state == Finishing; } bool isFinishing() const { return m_state == Finishing; }
bool isReadOnly() const { return m_mode == blink::WebIDBTransactionModeReadOnly; } bool isReadOnly() const { return m_mode == WebIDBTransactionModeReadOnly; }
bool isVersionChange() const { return m_mode == blink::WebIDBTransactionModeVersionChange; } bool isVersionChange() const { return m_mode == WebIDBTransactionModeVersionChange; }
// Implement the IDBTransaction IDL // Implement the IDBTransaction IDL
const String& mode() const; const String& mode() const;
...@@ -110,7 +110,7 @@ public: ...@@ -110,7 +110,7 @@ public:
virtual void stop() OVERRIDE; virtual void stop() OVERRIDE;
private: private:
IDBTransaction(ExecutionContext*, int64_t, const Vector<String>&, blink::WebIDBTransactionMode, IDBDatabase*, IDBOpenDBRequest*, const IDBDatabaseMetadata&); IDBTransaction(ExecutionContext*, int64_t, const Vector<String>&, WebIDBTransactionMode, IDBDatabase*, IDBOpenDBRequest*, const IDBDatabaseMetadata&);
void enqueueEvent(PassRefPtrWillBeRawPtr<Event>); void enqueueEvent(PassRefPtrWillBeRawPtr<Event>);
...@@ -125,7 +125,7 @@ private: ...@@ -125,7 +125,7 @@ private:
Member<IDBDatabase> m_database; Member<IDBDatabase> m_database;
const Vector<String> m_objectStoreNames; const Vector<String> m_objectStoreNames;
Member<IDBOpenDBRequest> m_openDBRequest; Member<IDBOpenDBRequest> m_openDBRequest;
const blink::WebIDBTransactionMode m_mode; const WebIDBTransactionMode m_mode;
State m_state; State m_state;
bool m_hasPendingActivity; bool m_hasPendingActivity;
bool m_contextStopped; bool m_contextStopped;
......
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
{ {
return adoptRefWillBeNoop(new IDBVersionChangeEvent()); return adoptRefWillBeNoop(new IDBVersionChangeEvent());
} }
static PassRefPtrWillBeRawPtr<IDBVersionChangeEvent> create(const AtomicString& eventType, unsigned long long oldVersion, const Nullable<unsigned long long>& newVersion, blink::WebIDBDataLoss dataLoss = blink::WebIDBDataLossNone, const String& dataLossMessage = String()) static PassRefPtrWillBeRawPtr<IDBVersionChangeEvent> create(const AtomicString& eventType, unsigned long long oldVersion, const Nullable<unsigned long long>& newVersion, WebIDBDataLoss dataLoss = WebIDBDataLossNone, const String& dataLossMessage = String())
{ {
return adoptRefWillBeNoop(new IDBVersionChangeEvent(eventType, oldVersion, newVersion, dataLoss, dataLossMessage)); return adoptRefWillBeNoop(new IDBVersionChangeEvent(eventType, oldVersion, newVersion, dataLoss, dataLossMessage));
} }
...@@ -73,12 +73,12 @@ public: ...@@ -73,12 +73,12 @@ public:
private: private:
IDBVersionChangeEvent(); IDBVersionChangeEvent();
IDBVersionChangeEvent(const AtomicString& eventType, unsigned long long oldVersion, const Nullable<unsigned long long>& newVersion, blink::WebIDBDataLoss, const String& dataLoss); IDBVersionChangeEvent(const AtomicString& eventType, unsigned long long oldVersion, const Nullable<unsigned long long>& newVersion, WebIDBDataLoss, const String& dataLoss);
IDBVersionChangeEvent(const AtomicString& eventType, const IDBVersionChangeEventInit&); IDBVersionChangeEvent(const AtomicString& eventType, const IDBVersionChangeEventInit&);
unsigned long long m_oldVersion; unsigned long long m_oldVersion;
Nullable<unsigned long long> m_newVersion; Nullable<unsigned long long> m_newVersion;
blink::WebIDBDataLoss m_dataLoss; WebIDBDataLoss m_dataLoss;
String m_dataLossMessage; String m_dataLossMessage;
}; };
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#include "wtf/RefPtr.h" #include "wtf/RefPtr.h"
namespace blink { namespace blink {
class IDBRequest;
class WebBlobInfo; class WebBlobInfo;
class WebData; class WebData;
class WebIDBCursor; class WebIDBCursor;
...@@ -44,30 +46,26 @@ class WebIDBIndex; ...@@ -44,30 +46,26 @@ class WebIDBIndex;
class WebIDBKey; class WebIDBKey;
class WebIDBKeyPath; class WebIDBKeyPath;
struct WebIDBMetadata; struct WebIDBMetadata;
}
namespace blink {
class IDBRequest;
class WebIDBCallbacksImpl FINAL : public blink::WebIDBCallbacks { class WebIDBCallbacksImpl FINAL : public WebIDBCallbacks {
public: public:
static PassOwnPtr<WebIDBCallbacksImpl> create(IDBRequest*); static PassOwnPtr<WebIDBCallbacksImpl> create(IDBRequest*);
virtual ~WebIDBCallbacksImpl(); virtual ~WebIDBCallbacksImpl();
// Pointers transfer ownership. // Pointers transfer ownership.
virtual void onError(const blink::WebIDBDatabaseError&) OVERRIDE; virtual void onError(const WebIDBDatabaseError&) OVERRIDE;
virtual void onSuccess(const blink::WebVector<blink::WebString>&) OVERRIDE; virtual void onSuccess(const WebVector<WebString>&) OVERRIDE;
virtual void onSuccess(blink::WebIDBCursor*, const blink::WebIDBKey&, const blink::WebIDBKey& primaryKey, const blink::WebData&, const blink::WebVector<blink::WebBlobInfo>&) OVERRIDE; virtual void onSuccess(WebIDBCursor*, const WebIDBKey&, const WebIDBKey& primaryKey, const WebData&, const WebVector<WebBlobInfo>&) OVERRIDE;
virtual void onSuccess(blink::WebIDBDatabase*, const blink::WebIDBMetadata&) OVERRIDE; virtual void onSuccess(WebIDBDatabase*, const WebIDBMetadata&) OVERRIDE;
virtual void onSuccess(const blink::WebIDBKey&) OVERRIDE; virtual void onSuccess(const WebIDBKey&) OVERRIDE;
virtual void onSuccess(const blink::WebData&, const blink::WebVector<blink::WebBlobInfo>&) OVERRIDE; virtual void onSuccess(const WebData&, const WebVector<WebBlobInfo>&) OVERRIDE;
virtual void onSuccess(const blink::WebData&, const blink::WebVector<blink::WebBlobInfo>&, const blink::WebIDBKey&, const blink::WebIDBKeyPath&) OVERRIDE; virtual void onSuccess(const WebData&, const WebVector<WebBlobInfo>&, const WebIDBKey&, const WebIDBKeyPath&) OVERRIDE;
virtual void onSuccess(long long) OVERRIDE; virtual void onSuccess(long long) OVERRIDE;
virtual void onSuccess() OVERRIDE; virtual void onSuccess() OVERRIDE;
virtual void onSuccess(const blink::WebIDBKey&, const blink::WebIDBKey& primaryKey, const blink::WebData&, const blink::WebVector<blink::WebBlobInfo>&) OVERRIDE; virtual void onSuccess(const WebIDBKey&, const WebIDBKey& primaryKey, const WebData&, const WebVector<WebBlobInfo>&) OVERRIDE;
virtual void onBlocked(long long oldVersion) OVERRIDE; virtual void onBlocked(long long oldVersion) OVERRIDE;
virtual void onUpgradeNeeded(long long oldVersion, blink::WebIDBDatabase*, const blink::WebIDBMetadata&, unsigned short dataLoss, blink::WebString dataLossMessage) OVERRIDE; virtual void onUpgradeNeeded(long long oldVersion, WebIDBDatabase*, const WebIDBMetadata&, unsigned short dataLoss, WebString dataLossMessage) OVERRIDE;
private: private:
explicit WebIDBCallbacksImpl(IDBRequest*); explicit WebIDBCallbacksImpl(IDBRequest*);
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
namespace blink { namespace blink {
class WebIDBDatabaseCallbacksImpl FINAL : public blink::WebIDBDatabaseCallbacks { class WebIDBDatabaseCallbacksImpl FINAL : public WebIDBDatabaseCallbacks {
public: public:
static PassOwnPtr<WebIDBDatabaseCallbacksImpl> create(IDBDatabaseCallbacks*); static PassOwnPtr<WebIDBDatabaseCallbacksImpl> create(IDBDatabaseCallbacks*);
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
virtual void onForcedClose() OVERRIDE; virtual void onForcedClose() OVERRIDE;
virtual void onVersionChange(long long oldVersion, long long newVersion) OVERRIDE; virtual void onVersionChange(long long oldVersion, long long newVersion) OVERRIDE;
virtual void onAbort(long long transactionId, const blink::WebIDBDatabaseError&) OVERRIDE; virtual void onAbort(long long transactionId, const WebIDBDatabaseError&) OVERRIDE;
virtual void onComplete(long long transactionId) OVERRIDE; virtual void onComplete(long long transactionId) OVERRIDE;
private: 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