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

Side by Side Diff: content/child/blink_platform_impl.h

Issue 2651883008: Make content::FeaturePolicy implement WebFeaturePolicy, and use it in blink code (Closed)
Patch Set: Cleanup Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 5 #ifndef CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 blink::WebString domCodeStringFromEnum(int dom_code) override; 115 blink::WebString domCodeStringFromEnum(int dom_code) override;
116 int domEnumFromCodeString(const blink::WebString& codeString) override; 116 int domEnumFromCodeString(const blink::WebString& codeString) override;
117 blink::WebString domKeyStringFromEnum(int dom_key) override; 117 blink::WebString domKeyStringFromEnum(int dom_key) override;
118 int domKeyEnumFromString(const blink::WebString& key_string) override; 118 int domKeyEnumFromString(const blink::WebString& key_string) override;
119 119
120 // This class does *not* own the compositor thread. It is the responsibility 120 // This class does *not* own the compositor thread. It is the responsibility
121 // of the caller to ensure that the compositor thread is cleared before it is 121 // of the caller to ensure that the compositor thread is cleared before it is
122 // destructed. 122 // destructed.
123 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread); 123 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread);
124 124
125 blink::WebFeaturePolicy* createFeaturePolicy(
126 const blink::WebFeaturePolicy* parentPolicy,
127 const blink::WebParsedFeaturePolicyHeader& policyHeader,
128 const blink::WebSecurityOrigin& origin) override;
129 bool isFeatureEnabledByPolicy(const blink::WebFeaturePolicy*,
130 blink::WebFeaturePolicyFeature) override;
131 void updateFeaturePolicyOrigin(blink::WebFeaturePolicy*,
132 const blink::WebSecurityOrigin&) override;
133
125 private: 134 private:
126 void InternalInit(); 135 void InternalInit();
127 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread); 136 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread);
128 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event); 137 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event);
129 138
130 bool IsMainThread() const; 139 bool IsMainThread() const;
131 140
132 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 141 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
133 WebThemeEngineImpl native_theme_engine_; 142 WebThemeEngineImpl native_theme_engine_;
134 WebFallbackThemeEngineImpl fallback_theme_engine_; 143 WebFallbackThemeEngineImpl fallback_theme_engine_;
135 base::ThreadLocalStorage::Slot current_thread_slot_; 144 base::ThreadLocalStorage::Slot current_thread_slot_;
136 webcrypto::WebCryptoImpl web_crypto_; 145 webcrypto::WebCryptoImpl web_crypto_;
137 146
138 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 147 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
139 scoped_refptr<NotificationDispatcher> notification_dispatcher_; 148 scoped_refptr<NotificationDispatcher> notification_dispatcher_;
140 scoped_refptr<PushDispatcher> push_dispatcher_; 149 scoped_refptr<PushDispatcher> push_dispatcher_;
141 150
142 blink::scheduler::WebThreadBase* compositor_thread_; 151 blink::scheduler::WebThreadBase* compositor_thread_;
143 }; 152 };
144 153
145 } // namespace content 154 } // namespace content
146 155
147 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 156 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/blink_platform_impl.cc » ('j') | content/common/feature_policy/feature_policy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698