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

Unified Diff: android_webview/native/public/aw_assets_utils.h

Issue 937863003: Add AwAssets into android_webview/native/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp file? Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/aw_browser_main_parts.cc ('k') | android_webview/native/webview_native.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/public/aw_assets_utils.h
diff --git a/android_webview/native/aw_assets.h b/android_webview/native/public/aw_assets_utils.h
similarity index 53%
copy from android_webview/native/aw_assets.h
copy to android_webview/native/public/aw_assets_utils.h
index 16fcafb4c633d3b4af960fc4e005a42b09e7bc6c..000bb4775361dbc7756cf25a15eef0df03e0e486 100644
--- a/android_webview/native/aw_assets.h
+++ b/android_webview/native/public/aw_assets_utils.h
@@ -1,18 +1,16 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2015 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 ANDROID_WEBVIEW_NATIVE_AW_ASSETS_H_
-#define ANDROID_WEBVIEW_NATIVE_AW_ASSETS_H_
+#ifndef ANDROID_WEBVIEW_NATIVE_PUBLIC_AW_ASSETS_H_
sgurun-gerrit only 2015/02/19 02:19:32 fix, seems like not named properly.
+#define ANDROID_WEBVIEW_NATIVE_PUBLIC_AW_ASSETS_H_
#include <string>
-
-#include "base/android/jni_android.h"
-#include "base/posix/global_descriptors.h"
+#include "android_webview/native/aw_assets.h"
namespace android_webview {
-namespace AwAssets {
+namespace AwAssetsUtils {
sgurun-gerrit only 2015/02/19 02:19:32 drop the plural in assets, i.e. AwAssetUtils
// Called by native to retrieve an asset (e.g. a .pak file) from the apk.
// Returns: true in case of success, false otherwise.
// Output arguments:
@@ -22,15 +20,11 @@ namespace AwAssets {
bool OpenAsset(const std::string& filename,
int* fd,
int64* offset,
- int64* size);
-
-bool RegisterAssetWithGlobalDescriptors(base::GlobalDescriptors::Key key,
- const std::string& asset_filename);
-
-} // namespace AwAssets
-
-bool RegisterAwAssets(JNIEnv* env);
+ int64* size) {
+ return AwAssets::OpenAsset(filename, fd, offset, size);
+};
+} // namespace AwAssetsUtils
} // namsespace android_webview
-#endif // ANDROID_WEBVIEW_NATIVE_AW_ASSETS_H_
+#endif // ANDROID_WEBVIEW_NATIVE_PUBLIC_AW_ASSETS_H_
« no previous file with comments | « android_webview/browser/aw_browser_main_parts.cc ('k') | android_webview/native/webview_native.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698