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

Unified Diff: Source/core/page/DOMWindowBase64.h

Issue 19675008: Move btoa() / atob() implementation out of DOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take Kentaro's feedback into consideration Created 7 years, 5 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/core/page/DOMWindow.cpp ('k') | Source/core/page/DOMWindowBase64.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DOMWindowBase64.h
diff --git a/Source/bindings/v8/ScriptString.h b/Source/core/page/DOMWindowBase64.h
similarity index 76%
copy from Source/bindings/v8/ScriptString.h
copy to Source/core/page/DOMWindowBase64.h
index 14467c7eb9feb0e4c7780ef86d013820b5f2174f..50b79721cfb415ea811843e4b097275b293d6ad7 100644
--- a/Source/bindings/v8/ScriptString.h
+++ b/Source/core/page/DOMWindowBase64.h
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2013 Samsung Electronics. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,24 +30,19 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ScriptString_h
-#define ScriptString_h
+#ifndef DOMWindowBase64_h
+#define DOMWindowBase64_h
-#include "bindings/v8/ScriptValue.h"
-#include "bindings/v8/V8Binding.h"
+#include "core/dom/ExceptionCode.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
-class ScriptString : public ScriptValue {
-public:
- ScriptString() { }
- explicit ScriptString(v8::Handle<v8::String> value) : ScriptValue(value) { }
-
- ScriptString concatenateWith(const String&);
- String flattenToString() const;
-};
+namespace DOMWindowBase64 {
+String btoa(void*, const String& stringToEncode, ExceptionCode&);
+String atob(void*, const String& encodedString, ExceptionCode&);
+}
} // namespace WebCore
-#endif // ScriptString_h
+#endif // DOMWindowBase64_h
« no previous file with comments | « Source/core/page/DOMWindow.cpp ('k') | Source/core/page/DOMWindowBase64.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698