Upload upstream chromium 69.0.3497
[platform/framework/web/chromium-efl.git] / base / critical_closure_internal_ios.mm
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
3 // found in the LICENSE file.
4
5 #include "base/critical_closure.h"
6
7 #import <UIKit/UIKit.h>
8
9 namespace base {
10 namespace internal {
11
12 bool IsMultiTaskingSupported() {
13   return [[UIDevice currentDevice] isMultitaskingSupported];
14 }
15
16 CriticalClosure::CriticalClosure(OnceClosure closure)
17     : closure_(std::move(closure)) {}
18
19 CriticalClosure::~CriticalClosure() {}
20
21 void CriticalClosure::Run() {
22   std::move(closure_).Run();
23 }
24
25 }  // namespace internal
26 }  // namespace base