Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1800)

Unified Diff: Source/modules/push_messaging/PushMessageData.h

Issue 1311853002: Update PushEvent and PushMessageData to match the spec. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/push_messaging/PushEventInit.idl ('k') | Source/modules/push_messaging/PushMessageData.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/push_messaging/PushMessageData.h
diff --git a/Source/modules/push_messaging/PushMessageData.h b/Source/modules/push_messaging/PushMessageData.h
index c604b0b9f21da29881ce7b78e00ace14a7224a6d..9861206a7d4945fd8f54ccad9df532e4d22a9b18 100644
--- a/Source/modules/push_messaging/PushMessageData.h
+++ b/Source/modules/push_messaging/PushMessageData.h
@@ -9,10 +9,12 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "modules/ModulesExport.h"
#include "platform/heap/Handle.h"
+#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
namespace blink {
+class ArrayBufferOrArrayBufferViewOrUSVString;
class Blob;
class DOMArrayBuffer;
class ExceptionState;
@@ -26,26 +28,23 @@ public:
{
return new PushMessageData();
}
-
- static PushMessageData* create(const String& messageData)
- {
- return new PushMessageData(messageData);
- }
+ static PushMessageData* create(const String& data);
+ static PushMessageData* create(const ArrayBufferOrArrayBufferViewOrUSVString& data);
virtual ~PushMessageData();
PassRefPtr<DOMArrayBuffer> arrayBuffer() const;
Blob* blob() const;
ScriptValue json(ScriptState*, ExceptionState&) const;
- const String& text() const;
+ String text() const;
DECLARE_TRACE();
private:
PushMessageData();
- explicit PushMessageData(const String& messageData);
+ PushMessageData(const char* data, unsigned bytesSize);
- String m_messageData;
+ Vector<char> m_data;
};
} // namespace blink
« no previous file with comments | « Source/modules/push_messaging/PushEventInit.idl ('k') | Source/modules/push_messaging/PushMessageData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698