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

Unified Diff: android_webview/native/shared_renderer_state_proxy.h

Issue 1844343005: WIP - Control the lifetime of RenderThreadManager from Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rework; BVR still needs to be informed of the SRS pointer. Created 4 years, 9 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: android_webview/native/shared_renderer_state_proxy.h
diff --git a/android_webview/native/shared_renderer_state_proxy.h b/android_webview/native/shared_renderer_state_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..bfe5b19db0e74a30519a5ef4bb50c350717a1b01
--- /dev/null
+++ b/android_webview/native/shared_renderer_state_proxy.h
@@ -0,0 +1,46 @@
+// Copyright 2016 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_SHARED_RENDERER_STATE_PROXY_H_
+#define ANDROID_WEBVIEW_NATIVE_SHARED_RENDERER_STATE_PROXY_H_
+
+#include <jni.h>
+
+#include "android_webview/browser/shared_renderer_state.h"
+#include "android_webview/browser/shared_renderer_state_client.h"
+#include "base/android/jni_weak_ref.h"
+#include "base/android/scoped_java_ref.h"
+
+namespace android_webview {
+
+class SharedRendererState;
+
+class SharedRendererStateProxy : public SharedRendererStateClient {
+ public:
+ void OnParentDrawConstraintsUpdated() override;
+ bool RequestDrawGL(bool wait_for_completion) override;
+ void DetachFunctorFromView() override;
+
+ SharedRendererStateProxy();
+ ~SharedRendererStateProxy() override;
+
+ void SetClient(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj,
+ jlong client);
+ void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+
+ void DeleteHardwareRenderer(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj);
+
+ jlong GetAwDrawGLViewContext(JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& obj);
+ private:
+ SharedRendererState shared_renderer_state_;
+ SharedRendererStateClient* client_;
+};
+
+bool RegisterSharedRendererStateProxy(JNIEnv* env);
+
+} // namespace android_webview
+
+#endif // ANDROID_WEBVIEW_NATIVE_SHARED_RENDERER_STATE_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698