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

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

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 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
« no previous file with comments | « chrome/renderer/tts_dispatcher.h ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const blink::WebSecurityOrigin& origin) override; 72 const blink::WebSecurityOrigin& origin) override;
73 bool DatabaseSetFileSize(const blink::WebString& vfs_file_name, 73 bool DatabaseSetFileSize(const blink::WebString& vfs_file_name,
74 long long size) override; 74 long long size) override;
75 size_t ActualMemoryUsageMB() override; 75 size_t ActualMemoryUsageMB() override;
76 size_t NumberOfProcessors() override; 76 size_t NumberOfProcessors() override;
77 77
78 size_t MaxDecodedImageBytes() override; 78 size_t MaxDecodedImageBytes() override;
79 uint32_t GetUniqueIdForProcess() override; 79 uint32_t GetUniqueIdForProcess() override;
80 blink::WebString UserAgent() override; 80 blink::WebString UserAgent() override;
81 blink::WebURLError CancelledError(const blink::WebURL& url) const override; 81 blink::WebURLError CancelledError(const blink::WebURL& url) const override;
82 blink::WebThread* CreateThread(const char* name) override; 82 std::unique_ptr<blink::WebThread> CreateThread(const char* name) override;
83 blink::WebThread* CurrentThread() override; 83 blink::WebThread* CurrentThread() override;
84 void RecordAction(const blink::UserMetricsAction&) override; 84 void RecordAction(const blink::UserMetricsAction&) override;
85 85
86 blink::WebData LoadResource(const char* name) override; 86 blink::WebData LoadResource(const char* name) override;
87 blink::WebString QueryLocalizedString( 87 blink::WebString QueryLocalizedString(
88 blink::WebLocalizedString::Name name) override; 88 blink::WebLocalizedString::Name name) override;
89 virtual blink::WebString queryLocalizedString( 89 virtual blink::WebString queryLocalizedString(
90 blink::WebLocalizedString::Name name, 90 blink::WebLocalizedString::Name name,
91 int numeric_value); 91 int numeric_value);
92 blink::WebString QueryLocalizedString(blink::WebLocalizedString::Name name, 92 blink::WebString QueryLocalizedString(blink::WebLocalizedString::Name name,
93 const blink::WebString& value) override; 93 const blink::WebString& value) override;
94 blink::WebString QueryLocalizedString( 94 blink::WebString QueryLocalizedString(
95 blink::WebLocalizedString::Name name, 95 blink::WebLocalizedString::Name name,
96 const blink::WebString& value1, 96 const blink::WebString& value1,
97 const blink::WebString& value2) override; 97 const blink::WebString& value2) override;
98 void SuddenTerminationChanged(bool enabled) override {} 98 void SuddenTerminationChanged(bool enabled) override {}
99 blink::WebThread* CompositorThread() const override; 99 blink::WebThread* CompositorThread() const override;
100 blink::WebGestureCurve* CreateFlingAnimationCurve( 100 std::unique_ptr<blink::WebGestureCurve> CreateFlingAnimationCurve(
101 blink::WebGestureDevice device_source, 101 blink::WebGestureDevice device_source,
102 const blink::WebFloatPoint& velocity, 102 const blink::WebFloatPoint& velocity,
103 const blink::WebSize& cumulative_scroll) override; 103 const blink::WebSize& cumulative_scroll) override;
104 void DidStartWorkerThread() override; 104 void DidStartWorkerThread() override;
105 void WillStopWorkerThread() override; 105 void WillStopWorkerThread() override;
106 bool AllowScriptExtensionForServiceWorker( 106 bool AllowScriptExtensionForServiceWorker(
107 const blink::WebURL& script_url) override; 107 const blink::WebURL& script_url) override;
108 blink::WebCrypto* Crypto() override; 108 blink::WebCrypto* Crypto() override;
109 blink::WebNotificationManager* GetNotificationManager() override; 109 blink::WebNotificationManager* GetNotificationManager() override;
110 blink::WebPushProvider* PushProvider() override; 110 blink::WebPushProvider* PushProvider() override;
111 blink::WebMediaCapabilitiesClient* MediaCapabilitiesClient() override; 111 blink::WebMediaCapabilitiesClient* MediaCapabilitiesClient() override;
112 112
113 blink::WebString DomCodeStringFromEnum(int dom_code) override; 113 blink::WebString DomCodeStringFromEnum(int dom_code) override;
114 int DomEnumFromCodeString(const blink::WebString& codeString) override; 114 int DomEnumFromCodeString(const blink::WebString& codeString) override;
115 blink::WebString DomKeyStringFromEnum(int dom_key) override; 115 blink::WebString DomKeyStringFromEnum(int dom_key) override;
116 int DomKeyEnumFromString(const blink::WebString& key_string) override; 116 int DomKeyEnumFromString(const blink::WebString& key_string) override;
117 117
118 // This class does *not* own the compositor thread. It is the responsibility 118 // This class does *not* own the compositor thread. It is the responsibility
119 // of the caller to ensure that the compositor thread is cleared before it is 119 // of the caller to ensure that the compositor thread is cleared before it is
120 // destructed. 120 // destructed.
121 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread); 121 void SetCompositorThread(blink::scheduler::WebThreadBase* compositor_thread);
122 122
123 blink::WebFeaturePolicy* CreateFeaturePolicy( 123 std::unique_ptr<blink::WebFeaturePolicy> CreateFeaturePolicy(
124 const blink::WebFeaturePolicy* parentPolicy, 124 const blink::WebFeaturePolicy* parentPolicy,
125 const blink::WebParsedFeaturePolicy& containerPolicy, 125 const blink::WebParsedFeaturePolicy& containerPolicy,
126 const blink::WebParsedFeaturePolicy& policyHeader, 126 const blink::WebParsedFeaturePolicy& policyHeader,
127 const blink::WebSecurityOrigin& origin) override; 127 const blink::WebSecurityOrigin& origin) override;
128 blink::WebFeaturePolicy* DuplicateFeaturePolicyWithOrigin( 128 std::unique_ptr<blink::WebFeaturePolicy> DuplicateFeaturePolicyWithOrigin(
129 const blink::WebFeaturePolicy& policy, 129 const blink::WebFeaturePolicy& policy,
130 const blink::WebSecurityOrigin& new_origin) override; 130 const blink::WebSecurityOrigin& new_origin) override;
131 131
132 private: 132 private:
133 void InternalInit(); 133 void InternalInit();
134 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread); 134 void WaitUntilWebThreadTLSUpdate(blink::scheduler::WebThreadBase* thread);
135 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event); 135 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event);
136 136
137 bool IsMainThread() const; 137 bool IsMainThread() const;
138 138
139 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; 139 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
140 WebThemeEngineImpl native_theme_engine_; 140 WebThemeEngineImpl native_theme_engine_;
141 WebFallbackThemeEngineImpl fallback_theme_engine_; 141 WebFallbackThemeEngineImpl fallback_theme_engine_;
142 base::ThreadLocalStorage::Slot current_thread_slot_; 142 base::ThreadLocalStorage::Slot current_thread_slot_;
143 webcrypto::WebCryptoImpl web_crypto_; 143 webcrypto::WebCryptoImpl web_crypto_;
144 media::WebMediaCapabilitiesClientImpl media_capabilities_client_; 144 media::WebMediaCapabilitiesClientImpl media_capabilities_client_;
145 145
146 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 146 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
147 scoped_refptr<NotificationDispatcher> notification_dispatcher_; 147 scoped_refptr<NotificationDispatcher> notification_dispatcher_;
148 148
149 blink::scheduler::WebThreadBase* compositor_thread_; 149 blink::scheduler::WebThreadBase* compositor_thread_;
150 }; 150 };
151 151
152 } // namespace content 152 } // namespace content
153 153
154 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ 154 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/renderer/tts_dispatcher.h ('k') | content/child/blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698