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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h

Issue 2458183002: Eagerly install Origin Trial features on window (Closed)
Patch Set: Clean up Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 18 matching lines...) Expand all
29 #ifndef V8DOMConfiguration_h 29 #ifndef V8DOMConfiguration_h
30 #define V8DOMConfiguration_h 30 #define V8DOMConfiguration_h
31 31
32 #include "bindings/core/v8/V8Binding.h" 32 #include "bindings/core/v8/V8Binding.h"
33 #include "bindings/core/v8/V8DOMWrapper.h" 33 #include "bindings/core/v8/V8DOMWrapper.h"
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include <v8.h> 35 #include <v8.h>
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class ScriptState;
40
39 class CORE_EXPORT V8DOMConfiguration final { 41 class CORE_EXPORT V8DOMConfiguration final {
40 STATIC_ONLY(V8DOMConfiguration); 42 STATIC_ONLY(V8DOMConfiguration);
41 43
42 public: 44 public:
43 // The following Configuration structs and install methods are used for 45 // The following Configuration structs and install methods are used for
44 // setting multiple properties on ObjectTemplate / FunctionTemplate, used 46 // setting multiple properties on ObjectTemplate / FunctionTemplate, used
45 // from the generated bindings initialization (ConfigureXXXTemplate). 47 // from the generated bindings initialization (ConfigureXXXTemplate).
46 // This greatly reduces the binary size by moving from code driven setup to 48 // This greatly reduces the binary size by moving from code driven setup to
47 // data table driven setup. 49 // data table driven setup.
48 50
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 v8::Local<v8::ObjectTemplate> prototypeTemplate, 91 v8::Local<v8::ObjectTemplate> prototypeTemplate,
90 const AttributeConfiguration*, 92 const AttributeConfiguration*,
91 size_t attributeCount); 93 size_t attributeCount);
92 94
93 static void installAttribute(v8::Isolate*, 95 static void installAttribute(v8::Isolate*,
94 const DOMWrapperWorld&, 96 const DOMWrapperWorld&,
95 v8::Local<v8::ObjectTemplate> instanceTemplate, 97 v8::Local<v8::ObjectTemplate> instanceTemplate,
96 v8::Local<v8::ObjectTemplate> prototypeTemplate, 98 v8::Local<v8::ObjectTemplate> prototypeTemplate,
97 const AttributeConfiguration&); 99 const AttributeConfiguration&);
98 100
99 static void installAttribute(v8::Isolate*, 101 static void installAttribute(const ScriptState*,
100 const DOMWrapperWorld&,
101 v8::Local<v8::Object> instance, 102 v8::Local<v8::Object> instance,
102 v8::Local<v8::Object> prototype, 103 v8::Local<v8::Object> prototype,
103 const AttributeConfiguration&); 104 const AttributeConfiguration&);
104 105
105 // AccessorConfiguration translates into calls to SetAccessorProperty() 106 // AccessorConfiguration translates into calls to SetAccessorProperty()
106 // on prototype ObjectTemplate. 107 // on prototype ObjectTemplate.
107 struct AccessorConfiguration { 108 struct AccessorConfiguration {
108 AccessorConfiguration& operator=(const AccessorConfiguration&) = delete; 109 AccessorConfiguration& operator=(const AccessorConfiguration&) = delete;
109 DISALLOW_NEW(); 110 DISALLOW_NEW();
110 const char* const name; 111 const char* const name;
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // Sets the class string of platform objects, interface prototype objects, 293 // Sets the class string of platform objects, interface prototype objects,
293 // etc. See also http://heycam.github.io/webidl/#dfn-class-string 294 // etc. See also http://heycam.github.io/webidl/#dfn-class-string
294 static void setClassString(v8::Isolate*, 295 static void setClassString(v8::Isolate*,
295 v8::Local<v8::ObjectTemplate>, 296 v8::Local<v8::ObjectTemplate>,
296 const char* classString); 297 const char* classString);
297 }; 298 };
298 299
299 } // namespace blink 300 } // namespace blink
300 301
301 #endif // V8DOMConfiguration_h 302 #endif // V8DOMConfiguration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698