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

Unified Diff: android_webview/browser/test/fake_window.h

Issue 1920843002: Test: deleting RTM before BVR does not leak resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix clang compile error Created 4 years, 8 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
« no previous file with comments | « android_webview/browser/render_thread_manager.cc ('k') | android_webview/browser/test/fake_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/test/fake_window.h
diff --git a/android_webview/browser/test/fake_window.h b/android_webview/browser/test/fake_window.h
index 96e45a06d0a3e4c2de1c11e93913892cfa0363c9..5302f60a9c03b8bb3d09d0acb34a99b6014b383f 100644
--- a/android_webview/browser/test/fake_window.h
+++ b/android_webview/browser/test/fake_window.h
@@ -24,7 +24,6 @@ class WaitableEvent;
namespace android_webview {
class BrowserViewRenderer;
-class RenderThreadManager;
class WindowHooks {
public:
@@ -33,19 +32,20 @@ class WindowHooks {
virtual void WillOnDraw() = 0;
virtual void DidOnDraw(bool success) = 0;
- virtual void WillSyncOnRT(RenderThreadManager* functor) = 0;
- virtual void DidSyncOnRT(RenderThreadManager* functor) = 0;
- virtual void WillProcessOnRT(RenderThreadManager* functor) = 0;
- virtual void DidProcessOnRT(RenderThreadManager* functor) = 0;
- virtual bool WillDrawOnRT(RenderThreadManager* functor,
- AwDrawGLInfo* draw_info) = 0;
- virtual void DidDrawOnRT(RenderThreadManager* functor) = 0;
+ virtual void WillSyncOnRT() = 0;
+ virtual void DidSyncOnRT() = 0;
+ virtual void WillProcessOnRT() = 0;
+ virtual void DidProcessOnRT() = 0;
+ virtual bool WillDrawOnRT(AwDrawGLInfo* draw_info) = 0;
+ virtual void DidDrawOnRT() = 0;
};
class FakeWindow {
public:
+ using DrawGLCallback = base::Callback<void(AwDrawGLInfo*)>;
+
FakeWindow(BrowserViewRenderer* view,
- RenderThreadManager* functor,
+ const DrawGLCallback& draw_gl,
WindowHooks* hooks,
gfx::Rect location);
~FakeWindow();
@@ -83,7 +83,7 @@ class FakeWindow {
// Render thread members.
std::unique_ptr<base::Thread> render_thread_;
base::SequenceChecker rt_checker_;
- RenderThreadManager* functor_;
+ DrawGLCallback draw_gl_;
scoped_refptr<base::SingleThreadTaskRunner> render_thread_loop_;
scoped_refptr<gfx::GLSurface> surface_;
scoped_refptr<gfx::GLContext> context_;
« no previous file with comments | « android_webview/browser/render_thread_manager.cc ('k') | android_webview/browser/test/fake_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698