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

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

Issue 2005433002: [Origin Trials] Install origin trial bindings on V8 context conditionally (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-ef-install
Patch Set: Rebase; Respect runtime-enabled flags as well Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 class FlexibleArrayBufferView; 62 class FlexibleArrayBufferView;
63 class Frame; 63 class Frame;
64 class LocalDOMWindow; 64 class LocalDOMWindow;
65 class LocalFrame; 65 class LocalFrame;
66 class NodeFilter; 66 class NodeFilter;
67 class TracedValue; 67 class TracedValue;
68 class WorkerGlobalScope; 68 class WorkerGlobalScope;
69 class WorkerOrWorkletGlobalScope; 69 class WorkerOrWorkletGlobalScope;
70 class XPathNSResolver; 70 class XPathNSResolver;
71 71
72 using initializeOriginTrialsFunction = void (*)(v8::Local<v8::Context>, const DO MWrapperWorld&);
73
72 template <typename T> 74 template <typename T>
73 struct V8TypeOf { 75 struct V8TypeOf {
74 STATIC_ONLY(V8TypeOf); 76 STATIC_ONLY(V8TypeOf);
75 // |Type| provides C++ -> V8 type conversion for DOM wrappers. 77 // |Type| provides C++ -> V8 type conversion for DOM wrappers.
76 // The Blink binding code generator will generate specialized version of 78 // The Blink binding code generator will generate specialized version of
77 // V8TypeOf for each wrapper class. 79 // V8TypeOf for each wrapper class.
78 typedef void Type; 80 typedef void Type;
79 }; 81 };
80 82
81 // Helpers for throwing JavaScript TypeErrors for arity mismatches. 83 // Helpers for throwing JavaScript TypeErrors for arity mismatches.
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 CORE_EXPORT v8::Isolate* toIsolate(ExecutionContext*); 833 CORE_EXPORT v8::Isolate* toIsolate(ExecutionContext*);
832 CORE_EXPORT v8::Isolate* toIsolate(LocalFrame*); 834 CORE_EXPORT v8::Isolate* toIsolate(LocalFrame*);
833 835
834 DOMWindow* toDOMWindow(v8::Isolate*, v8::Local<v8::Value>); 836 DOMWindow* toDOMWindow(v8::Isolate*, v8::Local<v8::Value>);
835 DOMWindow* toDOMWindow(v8::Local<v8::Context>); 837 DOMWindow* toDOMWindow(v8::Local<v8::Context>);
836 LocalDOMWindow* enteredDOMWindow(v8::Isolate*); 838 LocalDOMWindow* enteredDOMWindow(v8::Isolate*);
837 CORE_EXPORT LocalDOMWindow* currentDOMWindow(v8::Isolate*); 839 CORE_EXPORT LocalDOMWindow* currentDOMWindow(v8::Isolate*);
838 CORE_EXPORT LocalDOMWindow* callingDOMWindow(v8::Isolate*); 840 CORE_EXPORT LocalDOMWindow* callingDOMWindow(v8::Isolate*);
839 CORE_EXPORT ExecutionContext* toExecutionContext(v8::Local<v8::Context>); 841 CORE_EXPORT ExecutionContext* toExecutionContext(v8::Local<v8::Context>);
840 CORE_EXPORT void registerToExecutionContextForModules(ExecutionContext* (*toExec utionContextForModules)(v8::Local<v8::Context>)); 842 CORE_EXPORT void registerToExecutionContextForModules(ExecutionContext* (*toExec utionContextForModules)(v8::Local<v8::Context>));
843 CORE_EXPORT void initializeOriginTrials(v8::Local<v8::Context>, const DOMWrapper World&);
844 CORE_EXPORT initializeOriginTrialsFunction setInitializeOriginTrialsFunction(ini tializeOriginTrialsFunction);
841 CORE_EXPORT ExecutionContext* currentExecutionContext(v8::Isolate*); 845 CORE_EXPORT ExecutionContext* currentExecutionContext(v8::Isolate*);
842 CORE_EXPORT ExecutionContext* enteredExecutionContext(v8::Isolate*); 846 CORE_EXPORT ExecutionContext* enteredExecutionContext(v8::Isolate*);
843 847
844 // Returns a V8 context associated with a ExecutionContext and a DOMWrapperWorld . 848 // Returns a V8 context associated with a ExecutionContext and a DOMWrapperWorld .
845 // This method returns an empty context if there is no frame or the frame is alr eady detached. 849 // This method returns an empty context if there is no frame or the frame is alr eady detached.
846 CORE_EXPORT v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorl d&); 850 CORE_EXPORT v8::Local<v8::Context> toV8Context(ExecutionContext*, DOMWrapperWorl d&);
847 // Returns a V8 context associated with a Frame and a DOMWrapperWorld. 851 // Returns a V8 context associated with a Frame and a DOMWrapperWorld.
848 // This method returns an empty context if the frame is already detached. 852 // This method returns an empty context if the frame is already detached.
849 CORE_EXPORT v8::Local<v8::Context> toV8Context(Frame*, DOMWrapperWorld&); 853 CORE_EXPORT v8::Local<v8::Context> toV8Context(Frame*, DOMWrapperWorld&);
850 // Like toV8Context but also returns the context if the frame is already detache d. 854 // Like toV8Context but also returns the context if the frame is already detache d.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 typedef void (*InstallTemplateFunction)(v8::Isolate*, const DOMWrapperWorld&, v8 ::Local<v8::FunctionTemplate> interfaceTemplate); 941 typedef void (*InstallTemplateFunction)(v8::Isolate*, const DOMWrapperWorld&, v8 ::Local<v8::FunctionTemplate> interfaceTemplate);
938 942
939 // Freeze a V8 object. The type of the first parameter and the return value is 943 // Freeze a V8 object. The type of the first parameter and the return value is
940 // intentionally v8::Value so that this function can wrap toV8(). 944 // intentionally v8::Value so that this function can wrap toV8().
941 // If the argument isn't an object, this will crash. 945 // If the argument isn't an object, this will crash.
942 v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, v8::Isolate*); 946 v8::Local<v8::Value> freezeV8Object(v8::Local<v8::Value>, v8::Isolate*);
943 947
944 } // namespace blink 948 } // namespace blink
945 949
946 #endif // V8Binding_h 950 #endif // V8Binding_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698