Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: android_webview/native/aw_assets.h

Issue 401743003: [android_webview] Introduce AwAssets to reference assets inside the apk. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pakfiles
Patch Set: One char fix to make clang happy Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 #ifndef ANDROID_WEBVIEW_NATIVE_AW_ASSETS_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_ASSETS_H_
7
8 #include <string>
9
10 #include "base/android/jni_android.h"
11
12 namespace android_webview {
13 namespace AwAssets {
14
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);
25
26 } // namespace AwAssets
27
28 bool RegisterAwAssets(JNIEnv* env);
29
30 } // namsespace android_webview
31
32 #endif // ANDROID_WEBVIEW_NATIVE_AW_ASSETS_H_
OLDNEW
« no previous file with comments | « android_webview/native/android_webview_jni_registrar.cc ('k') | android_webview/native/aw_assets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698