forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zip_asset_bundle.h
36 lines (27 loc) · 1.1 KB
/
zip_asset_bundle.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2016 The Chromium 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_ASSETS_ZIP_ASSET_BUNDLE_H_
#define FLUTTER_ASSETS_ZIP_ASSET_BUNDLE_H_
#include "flutter/assets/zip_asset_store.h"
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "mojo/services/asset_bundle/interfaces/asset_bundle.mojom.h"
namespace blink {
class ZipAssetBundle : public mojo::asset_bundle::AssetBundle {
public:
ZipAssetBundle(
mojo::InterfaceRequest<mojo::asset_bundle::AssetBundle> request,
ftl::RefPtr<ZipAssetStore> store);
// mojo::assert_bundle::AssetBundle implementation:
void GetAsStream(
const mojo::String& asset_name,
const mojo::Callback<void(mojo::ScopedDataPipeConsumerHandle)>& callback)
override;
private:
~ZipAssetBundle() override;
mojo::StrongBinding<mojo::asset_bundle::AssetBundle> binding_;
ftl::RefPtr<ZipAssetStore> store_;
};
} // namespace blink
#endif // FLUTTER_ASSETS_ZIP_ASSET_BUNDLE_H_