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

Unified Diff: ui/android/resources/resource_manager_impl.h

Issue 1419843002: Hold a reference to any kind of context in WindowAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass Context instead of WindowAndroid from native ResourceManager to java side. Created 5 years, 2 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
Index: ui/android/resources/resource_manager_impl.h
diff --git a/ui/android/resources/resource_manager_impl.h b/ui/android/resources/resource_manager_impl.h
index 6e74ca58e45af8365ae641bc5aff853c0f85ec5c..d9a92b0a0a28d3df8f77881b6671777270513b35 100644
--- a/ui/android/resources/resource_manager_impl.h
+++ b/ui/android/resources/resource_manager_impl.h
@@ -9,6 +9,7 @@
#include "ui/android/resources/resource_manager.h"
#include "ui/android/ui_android_export.h"
#include "ui/gfx/geometry/rect.h"
+#include "ui/gfx/native_widget_types.h"
namespace ui {
@@ -16,7 +17,7 @@ class UI_ANDROID_EXPORT ResourceManagerImpl : public ResourceManager {
public:
static ResourceManagerImpl* FromJavaObject(jobject jobj);
- ResourceManagerImpl();
+ explicit ResourceManagerImpl(gfx::NativeWindow native_window);
~ResourceManagerImpl() override;
void Init(cc::LayerTreeHost* host);
@@ -47,6 +48,11 @@ class UI_ANDROID_EXPORT ResourceManagerImpl : public ResourceManager {
private:
friend class TestResourceManagerImpl;
+ // Only for testing
+ // TODO(gsennton) remove this by adding functionality to create a NativeWindow
+ // from a Context (and pass that NativeWindow to the public ctor)
+ explicit ResourceManagerImpl(jobject context);
+
// Start loading the resource. virtual for testing.
virtual void PreloadResourceFromJava(AndroidResourceType res_type,
int res_id);

Powered by Google App Engine
This is Rietveld 408576698