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

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

Issue 2058133002: Fix DevTools support of worklets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/BindingSecurity.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "wtf/Allocator.h" 35 #include "wtf/Allocator.h"
36 #include <v8.h> 36 #include <v8.h>
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class DOMWindow; 40 class DOMWindow;
41 class EventTarget; 41 class EventTarget;
42 class ExceptionState; 42 class ExceptionState;
43 class ExecutionContext;
43 class Frame; 44 class Frame;
44 class LocalDOMWindow; 45 class LocalDOMWindow;
45 class Location; 46 class Location;
46 class MainThreadWorkletGlobalScope; 47 class MainThreadWorkletGlobalScope;
47 class Node; 48 class Node;
48 49
49 enum SecurityReportingOption { 50 enum SecurityReportingOption {
50 DoNotReportSecurityError, 51 DoNotReportSecurityError,
51 ReportSecurityError, 52 ReportSecurityError,
52 }; 53 };
(...skipping 12 matching lines...) Expand all
65 // 66 //
66 // DOMWindow 67 // DOMWindow
67 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const DOMWindow* target, ExceptionState&); 68 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const DOMWindow* target, ExceptionState&);
68 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const DOMWindow* target, SecurityReportingOption); 69 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const DOMWindow* target, SecurityReportingOption);
69 // EventTarget (as the parent of DOMWindow) 70 // EventTarget (as the parent of DOMWindow)
70 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const EventTarget* target, ExceptionState&); // NOLINT(readability/par ameter_name) 71 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const EventTarget* target, ExceptionState&); // NOLINT(readability/par ameter_name)
71 // Location 72 // Location
72 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const Location* target, ExceptionState&); 73 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const Location* target, ExceptionState&);
73 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const Location* target, SecurityReportingOption); 74 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const Location* target, SecurityReportingOption);
74 // MainThreadWorkletGlobalScope 75 // MainThreadWorkletGlobalScope
75 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const MainThreadWorkletGlobalScope* target, SecurityReportingOption); 76 static bool shouldAllowAccessTo(v8::Isolate*, v8::Local<v8::Context>, const ExecutionContext*, const MainThreadWorkletGlobalScope*, SecurityReportingOption) ;
77
78 static bool shouldAllowAccessTo(v8::Isolate*, v8::Local<v8::Context> calling , v8::Local<v8::Context> target, SecurityReportingOption);
76 // Prefer to use the previous overloads instead of falling back to using 79 // Prefer to use the previous overloads instead of falling back to using
77 // Frame*. 80 // Frame*.
78 static bool shouldAllowAccessToFrame(v8::Isolate*, const LocalDOMWindow* acc essingWindow, const Frame* target, SecurityReportingOption); // OBSOLETE 81 static bool shouldAllowAccessToFrame(v8::Isolate*, const LocalDOMWindow* acc essingWindow, const Frame* target, SecurityReportingOption); // OBSOLETE
79 82
80 // Check if the caller (|accessingWindow|) is allowed to access the JS 83 // Check if the caller (|accessingWindow|) is allowed to access the JS
81 // returned object (|target|), where the returned object is the JS object 84 // returned object (|target|), where the returned object is the JS object
82 // which is returned as a result of invoking a DOM attribute or DOM 85 // which is returned as a result of invoking a DOM attribute or DOM
83 // operation (in the form of 86 // operation (in the form of
84 // var x = receiver.domAttr // or receiver.domOp() 87 // var x = receiver.domAttr // or receiver.domOp()
85 // where |x| is the returned object). 88 // where |x| is the returned object).
86 // See window.frameElement for example, which may return a frame object. 89 // See window.frameElement for example, which may return a frame object.
87 // The object returned from window.frameElement must be the same origin if 90 // The object returned from window.frameElement must be the same origin if
88 // it's not null. 91 // it's not null.
89 // 92 //
90 // Node 93 // Node
91 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const Node* target, ExceptionState&); 94 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const Node* target, ExceptionState&);
92 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const Node* target, SecurityReportingOption); 95 static bool shouldAllowAccessTo(v8::Isolate*, const LocalDOMWindow* accessin gWindow, const Node* target, SecurityReportingOption);
93 }; 96 };
94 97
95 } // namespace blink 98 } // namespace blink
96 99
97 #endif 100 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698