Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / android_webview / native / aw_assets.h
blob229392ca76ad1d2e77e94f7bf9b4b38d9066f58a
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.
5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_ASSETS_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_ASSETS_H_
8 #include <string>
10 #include "base/android/jni_android.h"
12 namespace android_webview {
13 namespace AwAssets {
15 // Called by native to retrieve an asset (e.g. a .pak file) from the apk.
16 // Returns: true in case of success, false otherwise.
17 // Output arguments:
18 // - |fd|: file descriptor to the apk. The caller takes the ownership.
19 // - |offset|: offset in bytes from the start of the file
20 // - |size|: size in bytes of the asset / resource.
21 bool OpenAsset(const std::string& filename,
22 int* fd,
23 int64* offset,
24 int64* size);
26 } // namespace AwAssets
28 bool RegisterAwAssets(JNIEnv* env);
30 } // namsespace android_webview
32 #endif // ANDROID_WEBVIEW_NATIVE_AW_ASSETS_H_