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

Side by Side Diff: Source/bindings/v8/Dictionary.h

Issue 74533003: Add Perl IDL support for method parameter type sequence<Dictionary> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review changes Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.cpp ('k') | Source/bindings/v8/Dictionary.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 class SpeechRecognitionError; 48 class SpeechRecognitionError;
49 class SpeechRecognitionResult; 49 class SpeechRecognitionResult;
50 class SpeechRecognitionResultList; 50 class SpeechRecognitionResultList;
51 class Storage; 51 class Storage;
52 class TrackBase; 52 class TrackBase;
53 class VoidCallback; 53 class VoidCallback;
54 54
55 class Dictionary { 55 class Dictionary {
56 public: 56 public:
57 Dictionary(); 57 Dictionary();
58 Dictionary(const v8::Local<v8::Value>& options, v8::Isolate*); 58 Dictionary(const v8::Handle<v8::Value>& options, v8::Isolate*);
59 ~Dictionary(); 59 ~Dictionary();
60 60
61 Dictionary& operator=(const Dictionary&); 61 Dictionary& operator=(const Dictionary&);
62 62
63 bool isObject() const; 63 bool isObject() const;
64 bool isUndefinedOrNull() const; 64 bool isUndefinedOrNull() const;
65 65
66 bool get(const String&, bool&) const; 66 bool get(const String&, bool&) const;
67 bool get(const String&, int32_t&) const; 67 bool get(const String&, int32_t&) const;
68 bool get(const String&, double&, bool& hasValue) const; 68 bool get(const String&, double&, bool& hasValue) const;
(...skipping 24 matching lines...) Expand all
93 bool get(const String&, ArrayValue&) const; 93 bool get(const String&, ArrayValue&) const;
94 bool get(const String&, RefPtr<DOMError>&) const; 94 bool get(const String&, RefPtr<DOMError>&) const;
95 bool get(const String&, RefPtr<VoidCallback>&) const; 95 bool get(const String&, RefPtr<VoidCallback>&) const;
96 bool get(const String&, v8::Local<v8::Value>&) const; 96 bool get(const String&, v8::Local<v8::Value>&) const;
97 97
98 bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const; 98 bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const;
99 bool getOwnPropertyNames(Vector<String>&) const; 99 bool getOwnPropertyNames(Vector<String>&) const;
100 100
101 bool getWithUndefinedOrNullCheck(const String&, String&) const; 101 bool getWithUndefinedOrNullCheck(const String&, String&) const;
102 102
103 // Only allow inline allocation.
104 void* operator new(size_t, NotNullTag, void* location) { return location; }
105
103 private: 106 private:
107 // Disallow new allocation.
108 void* operator new(size_t);
109
104 bool getKey(const String& key, v8::Local<v8::Value>&) const; 110 bool getKey(const String& key, v8::Local<v8::Value>&) const;
105 111
106 // This object can only be used safely when stack allocated because of v8::L ocal. 112 v8::Handle<v8::Value> m_options;
107 static void* operator new(size_t);
108 static void* operator new[](size_t);
109 static void operator delete(void *);
110
111 v8::Local<v8::Value> m_options;
112 v8::Isolate* m_isolate; 113 v8::Isolate* m_isolate;
113 }; 114 };
114 115
115 } 116 }
116 117
117 #endif // Dictionary_h 118 #endif // Dictionary_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.cpp ('k') | Source/bindings/v8/Dictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698