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

Unified Diff: Source/bindings/core/v8/DictionaryHelper.h

Issue 373423002: Split Dictionary's get and convert into DictionaryHelper. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
Index: Source/bindings/core/v8/DictionaryHelper.h
diff --git a/Source/bindings/core/v8/DictionaryHelper.h b/Source/bindings/core/v8/DictionaryHelper.h
new file mode 100644
index 0000000000000000000000000000000000000000..88d9f8343aab321ed6f17a8829ed637ac53abb22
--- /dev/null
+++ b/Source/bindings/core/v8/DictionaryHelper.h
@@ -0,0 +1,23 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DictionaryHelper_h
+#define DictionaryHelper_h
+
+#include "bindings/core/v8/Dictionary.h"
+
+namespace WebCore {
+
+struct DictionaryHelper {
haraken 2014/07/10 15:05:47 I'd put DictionaryHelper into Dictionary.h, so tha
tasak 2014/07/11 04:51:22 Done.
+ template <typename T>
+ static bool get(const Dictionary&, const String& key, T& value);
+ template <typename T>
+ static bool get(const Dictionary&, const String& key, T& value, bool& hasValue);
+ template <typename T>
+ static bool convert(const Dictionary&, Dictionary::ConversionContext&, const String& key, T& value);
+};
+
+} // namespace WebCore
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698