OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/android/resources/resource_manager_impl.h" | 5 #include "ui/android/resources/resource_manager_impl.h" |
6 | 6 |
7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
9 #include "jni/ResourceManager_jni.h" | 9 #include "jni/ResourceManager_jni.h" |
10 #include "ui/android/resources/ui_resource_android.h" | 10 #include "ui/android/resources/ui_resource_android.h" |
11 #include "ui/android/resources/ui_resource_provider.h" | 11 #include "ui/android/resources/ui_resource_provider.h" |
12 #include "ui/gfx/android/java_bitmap.h" | 12 #include "ui/gfx/android/java_bitmap.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 // static | 16 // static |
17 ResourceManagerImpl* ResourceManagerImpl::FromJavaObject(jobject jobj) { | 17 ResourceManagerImpl* ResourceManagerImpl::FromJavaObject(jobject jobj) { |
18 return reinterpret_cast<ResourceManagerImpl*>( | 18 return reinterpret_cast<ResourceManagerImpl*>( |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 void ResourceManagerImpl::RequestResourceFromJava(AndroidResourceType res_type, | 123 void ResourceManagerImpl::RequestResourceFromJava(AndroidResourceType res_type, |
124 int res_id) { | 124 int res_id) { |
125 TRACE_EVENT2("ui", "ResourceManagerImpl::RequestResourceFromJava", | 125 TRACE_EVENT2("ui", "ResourceManagerImpl::RequestResourceFromJava", |
126 "resource_type", res_type, | 126 "resource_type", res_type, |
127 "resource_id", res_id); | 127 "resource_id", res_id); |
128 Java_ResourceManager_resourceRequested(base::android::AttachCurrentThread(), | 128 Java_ResourceManager_resourceRequested(base::android::AttachCurrentThread(), |
129 java_obj_.obj(), res_type, res_id); | 129 java_obj_.obj(), res_type, res_id); |
130 } | 130 } |
131 | 131 |
132 } // namespace ui | 132 } // namespace ui |
OLD | NEW |