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

Unified Diff: Source/core/dom/Maplike.h

Issue 926563002: Move Iterable.h and Maplike.h to bindings/core/v8/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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/dom/Iterable.h ('k') | Source/core/html/DOMFormData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Maplike.h
diff --git a/Source/core/dom/Maplike.h b/Source/core/dom/Maplike.h
deleted file mode 100644
index 8d001413df1e6dd90af5108fcc3fd97272873856..0000000000000000000000000000000000000000
--- a/Source/core/dom/Maplike.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2015 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 Maplike_h
-#define Maplike_h
-
-#include "bindings/core/v8/ScriptValue.h"
-#include "bindings/core/v8/ToV8.h"
-#include "core/dom/Iterable.h"
-
-namespace blink {
-
-template <typename KeyType, typename ValueType>
-class Maplike : public PairIterable<KeyType, ValueType> {
-public:
- bool hasForBinding(ScriptState* scriptState, const KeyType& key, ExceptionState& exceptionState)
- {
- ValueType value;
- return getMapEntry(scriptState, key, value, exceptionState);
- }
-
- ScriptValue getForBinding(ScriptState* scriptState, const KeyType& key, ExceptionState& exceptionState)
- {
- ValueType value;
- if (getMapEntry(scriptState, key, value, exceptionState))
- return ScriptValue(scriptState, toV8(value, scriptState->context()->Global(), scriptState->isolate()));
- return ScriptValue(scriptState, v8::Undefined(scriptState->isolate()));
- }
-
-private:
- virtual bool getMapEntry(ScriptState*, const KeyType&, ValueType&, ExceptionState&) = 0;
-};
-
-} // namespace blink
-
-#endif // Maplike_h
« no previous file with comments | « Source/core/dom/Iterable.h ('k') | Source/core/html/DOMFormData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698