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

Side by Side Diff: ui/base/resource/resource_bundle_android.cc

Issue 854713003: More old files deletion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tryjobs? Created 5 years, 11 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 (c) 2012 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 #include "ui/base/resource/resource_bundle.h"
6
7 #include <string>
8
9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h"
11 #include "base/files/file_path.h"
12 #include "base/files/file_util.h"
13 #include "base/logging.h"
14 #include "base/path_service.h"
15 #include "base/strings/stringprintf.h"
16 #include "jni/ResourceBundle_jni.h"
17 #include "ui/base/resource/resource_handle.h"
18 #include "ui/base/ui_base_paths.h"
19
20 namespace ui {
21
22 void ResourceBundle::LoadCommonResources() {
23 base::FilePath path;
24 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &path);
25 AddDataPackFromPath(path.AppendASCII("chrome_100_percent.pak"),
26 SCALE_FACTOR_100P);
27 }
28
29 gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
30 // Flipped image is not used on Android.
31 DCHECK_EQ(rtl, RTL_DISABLED);
32 return GetImageNamed(resource_id);
33 }
34
35 bool AssetContainedInApk(const std::string& filename) {
36 JNIEnv* env = base::android::AttachCurrentThread();
37 return Java_ResourceBundle_assetContainedInApk(
38 env,
39 base::android::GetApplicationContext(),
40 base::android::ConvertUTF8ToJavaString(env, filename).obj());
41 }
42
43 bool RegisterResourceBundleAndroid(JNIEnv* env) {
44 return RegisterNativesImpl(env);
45 }
46
47 }
OLDNEW
« no previous file with comments | « ui/base/resource/resource_bundle_android.h ('k') | ui/base/resource/resource_bundle_auralinux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698