Chromium Code Reviews| 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_ |