Chromium Code Reviews

Unified Diff: content/child/blink_platform_impl.cc

Issue 2850593002: Revert of [blink] Unique pointers in Platform.h (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/ppapi_plugin/ppapi_blink_platform_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 6d68d2ed987ed4cca56a08bb72a8081d3c783d9b..74044ea67edd0c7c3f58e2869664c22be86c354e 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -52,7 +52,6 @@
#include "net/base/net_errors.h"
#include "third_party/WebKit/public/platform/WebData.h"
#include "third_party/WebKit/public/platform/WebFloatPoint.h"
-#include "third_party/WebKit/public/platform/WebGestureCurve.h"
#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
@@ -403,14 +402,13 @@
return CreateWebURLError(unreachableURL, false, net::ERR_ABORTED);
}
-std::unique_ptr<blink::WebThread> BlinkPlatformImpl::CreateThread(
- const char* name) {
+blink::WebThread* BlinkPlatformImpl::CreateThread(const char* name) {
std::unique_ptr<blink::scheduler::WebThreadBase> thread =
blink::scheduler::WebThreadBase::CreateWorkerThread(
name, base::Thread::Options());
thread->Init();
WaitUntilWebThreadTLSUpdate(thread.get());
- return std::move(thread);
+ return thread.release();
}
void BlinkPlatformImpl::SetCompositorThread(
@@ -687,15 +685,14 @@
return compositor_thread_;
}
-std::unique_ptr<blink::WebGestureCurve>
-BlinkPlatformImpl::CreateFlingAnimationCurve(
+blink::WebGestureCurve* BlinkPlatformImpl::CreateFlingAnimationCurve(
blink::WebGestureDevice device_source,
const blink::WebFloatPoint& velocity,
const blink::WebSize& cumulative_scroll) {
return ui::WebGestureCurveImpl::CreateFromDefaultPlatformCurve(
- gfx::Vector2dF(velocity.x, velocity.y),
- gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height),
- IsMainThread());
+ gfx::Vector2dF(velocity.x, velocity.y),
+ gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height),
+ IsMainThread()).release();
}
void BlinkPlatformImpl::DidStartWorkerThread() {
@@ -836,7 +833,7 @@
ui::KeycodeConverter::KeyStringToDomKey(key_string.Utf8()));
}
-std::unique_ptr<blink::WebFeaturePolicy> BlinkPlatformImpl::CreateFeaturePolicy(
+blink::WebFeaturePolicy* BlinkPlatformImpl::CreateFeaturePolicy(
const blink::WebFeaturePolicy* parent_policy,
const blink::WebParsedFeaturePolicy& container_policy,
const blink::WebParsedFeaturePolicy& policy_header,
@@ -845,15 +842,16 @@
static_cast<const FeaturePolicy*>(parent_policy),
FeaturePolicyHeaderFromWeb(container_policy), url::Origin(origin));
policy->SetHeaderPolicy(FeaturePolicyHeaderFromWeb(policy_header));
- return std::move(policy);
-}
-
-std::unique_ptr<blink::WebFeaturePolicy>
-BlinkPlatformImpl::DuplicateFeaturePolicyWithOrigin(
+ return policy.release();
+}
+
+blink::WebFeaturePolicy* BlinkPlatformImpl::DuplicateFeaturePolicyWithOrigin(
const blink::WebFeaturePolicy& policy,
const blink::WebSecurityOrigin& new_origin) {
- return FeaturePolicy::CreateFromPolicyWithOrigin(
- static_cast<const FeaturePolicy&>(policy), url::Origin(new_origin));
+ std::unique_ptr<FeaturePolicy> new_policy =
+ FeaturePolicy::CreateFromPolicyWithOrigin(
+ static_cast<const FeaturePolicy&>(policy), url::Origin(new_origin));
+ return new_policy.release();
}
} // namespace content
« no previous file with comments | « content/child/blink_platform_impl.h ('k') | content/ppapi_plugin/ppapi_blink_platform_impl.h » ('j') | no next file with comments »

Powered by Google App Engine