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

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: Duplicate FP object rather than modifying in-place Created 3 years, 9 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 blink::WebString domCodeStringFromEnum(int dom_code) override; 114 blink::WebString domCodeStringFromEnum(int dom_code) override;
115 int domEnumFromCodeString(const blink::WebString& codeString) override; 115 int domEnumFromCodeString(const blink::WebString& codeString) override;
116 blink::WebString domKeyStringFromEnum(int dom_key) override; 116 blink::WebString domKeyStringFromEnum(int dom_key) override;
117 int domKeyEnumFromString(const blink::WebString& key_string) override; 117 int domKeyEnumFromString(const blink::WebString& key_string) override;
118 118
119 // This class does *not* own the compositor thread. It is the responsibility 119 // This class does *not* own the compositor thread. It is the responsibility
120 // of the caller to ensure that the compositor thread is cleared before it is 120 // of the caller to ensure that the compositor thread is cleared before it is
121 // destructed. 121 // destructed.
122 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread); 122 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread);
123 123
124 blink::WebFeaturePolicy* createFeaturePolicy(
125 const blink::WebFeaturePolicy* parentPolicy,
126 const blink::WebParsedFeaturePolicyHeader& containerPolicy,
127 const blink::WebParsedFeaturePolicyHeader& policyHeader,
128 const blink::WebSecurityOrigin& origin) override;
129 blink::WebFeaturePolicy* duplicateFeaturePolicyWithOrigin(
130 const blink::WebFeaturePolicy& policy,
131 const blink::WebSecurityOrigin& new_origin) override;
132
124 private: 133 private:
125 void InternalInit(); 134 void InternalInit();
126 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread); 135 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread);
127 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event); 136 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event);
128 137
129 bool IsMainThread() const; 138 bool IsMainThread() const;
130 139
131 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 140 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
132 WebThemeEngineImpl native_theme_engine_; 141 WebThemeEngineImpl native_theme_engine_;
133 WebFallbackThemeEngineImpl fallback_theme_engine_; 142 WebFallbackThemeEngineImpl fallback_theme_engine_;
134 base::ThreadLocalStorage::Slot current_thread_slot_; 143 base::ThreadLocalStorage::Slot current_thread_slot_;
135 webcrypto::WebCryptoImpl web_crypto_; 144 webcrypto::WebCryptoImpl web_crypto_;
136 145
137 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 146 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
138 scoped_refptr<NotificationDispatcher> notification_dispatcher_; 147 scoped_refptr<NotificationDispatcher> notification_dispatcher_;
139 148
140 blink::scheduler::WebThreadBase* compositor_thread_; 149 blink::scheduler::WebThreadBase* compositor_thread_;
141 }; 150 };
142 151
143 } // namespace content 152 } // namespace content
144 153
145 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 154 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698