Files
engine/lib/ui/dart_wrapper.h
Chinmay Garde eec74e5c92 Rename the blink namespace to flutter. (#8517)
Some components in the Flutter engine were derived from the forked blink codebase. While the forked components have either been removed or rewritten, the use of the blink namespace has mostly (and inconsistently) remained. This renames the blink namesapce to flutter for consistency. There are no functional changes in this patch.
2019-04-09 12:44:42 -07:00

29 lines
814 B
C++

// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_LIB_UI_DART_WRAPPER_H_
#define FLUTTER_LIB_UI_DART_WRAPPER_H_
#include "flutter/fml/memory/ref_counted.h"
#include "third_party/tonic/dart_wrappable.h"
namespace flutter {
template <typename T>
class RefCountedDartWrappable : public fml::RefCountedThreadSafe<T>,
public tonic::DartWrappable {
public:
virtual void RetainDartWrappableReference() const override {
fml::RefCountedThreadSafe<T>::AddRef();
}
virtual void ReleaseDartWrappableReference() const override {
fml::RefCountedThreadSafe<T>::Release();
}
};
} // namespace flutter
#endif // FLUTTER_LIB_UI_DART_WRAPPER_H_