Index: android_webview/browser/shared_renderer_state.h |
diff --git a/android_webview/browser/shared_renderer_state.h b/android_webview/browser/shared_renderer_state.h |
index ec21663f203a160c4feaf7881dc488aa78ba1d36..c2c1eee864b0d8025c65ad819a54823138f52a84 100644 |
--- a/android_webview/browser/shared_renderer_state.h |
+++ b/android_webview/browser/shared_renderer_state.h |
@@ -5,6 +5,9 @@ |
#ifndef ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ |
#define ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ |
+#include <queue> |
+ |
+#include "base/callback.h" |
#include "base/message_loop/message_loop_proxy.h" |
#include "base/synchronization/lock.h" |
#include "content/public/browser/android/synchronous_compositor.h" |
@@ -55,6 +58,14 @@ class SharedRendererState { |
void SetDrawGLInput(const DrawGLInput& input); |
DrawGLInput GetDrawGLInput() const; |
+ void ClearClosureQueue(); |
+ void AppendClosure(const base::Closure& closure); |
+ // Will return empty closure if queue empty. |
+ base::Closure PopFrontClosure(); |
+ |
+ void SetHardwareInitialized(bool initialized); |
+ bool IsHardwareInitialized() const; |
+ |
private: |
void ClientRequestDrawGLOnUIThread(); |
@@ -68,6 +79,8 @@ class SharedRendererState { |
mutable base::Lock lock_; |
content::SynchronousCompositor* compositor_; |
DrawGLInput draw_gl_input_; |
+ std::queue<base::Closure> closure_queue_; |
+ bool hardware_initialized_; |
}; |
} // namespace android_webview |