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 #ifndef ANDROID_WEBVIEW_BROWSER_TEST_FAKE_WINDOW_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_TEST_FAKE_WINDOW_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_TEST_FAKE_WINDOW_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_TEST_FAKE_WINDOW_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "android_webview/public/browser/draw_gl.h" | 10 #include "android_webview/public/browser/draw_gl.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 virtual void WillProcessOnRT(SharedRendererState* functor) = 0; | 38 virtual void WillProcessOnRT(SharedRendererState* functor) = 0; |
39 virtual void DidProcessOnRT(SharedRendererState* functor) = 0; | 39 virtual void DidProcessOnRT(SharedRendererState* functor) = 0; |
40 virtual bool WillDrawOnRT(SharedRendererState* functor, | 40 virtual bool WillDrawOnRT(SharedRendererState* functor, |
41 AwDrawGLInfo* draw_info) = 0; | 41 AwDrawGLInfo* draw_info) = 0; |
42 virtual void DidDrawOnRT(SharedRendererState* functor) = 0; | 42 virtual void DidDrawOnRT(SharedRendererState* functor) = 0; |
43 }; | 43 }; |
44 | 44 |
45 class FakeWindow { | 45 class FakeWindow { |
46 public: | 46 public: |
47 FakeWindow(BrowserViewRenderer* view, | 47 FakeWindow(BrowserViewRenderer* view, |
| 48 SharedRendererState* functor, |
48 WindowHooks* hooks, | 49 WindowHooks* hooks, |
49 gfx::Rect location); | 50 gfx::Rect location); |
50 ~FakeWindow(); | 51 ~FakeWindow(); |
51 | 52 |
52 void Detach(); | 53 void Detach(); |
53 | 54 |
54 // BrowserViewRendererClient methods. | 55 // BrowserViewRendererClient methods. |
55 void RequestDrawGL(bool wait_for_completion); | 56 void RequestDrawGL(bool wait_for_completion); |
56 void PostInvalidate(); | 57 void PostInvalidate(); |
57 const gfx::Size& surface_size() { return surface_size_; } | 58 const gfx::Size& surface_size() { return surface_size_; } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 bool context_current_; | 90 bool context_current_; |
90 | 91 |
91 base::WeakPtrFactory<FakeWindow> weak_ptr_factory_; | 92 base::WeakPtrFactory<FakeWindow> weak_ptr_factory_; |
92 | 93 |
93 DISALLOW_COPY_AND_ASSIGN(FakeWindow); | 94 DISALLOW_COPY_AND_ASSIGN(FakeWindow); |
94 }; | 95 }; |
95 | 96 |
96 } // namespace android_webview | 97 } // namespace android_webview |
97 | 98 |
98 #endif // ANDROID_WEBVIEW_BROWSER_TEST_FAKE_WINDOW_H_ | 99 #endif // ANDROID_WEBVIEW_BROWSER_TEST_FAKE_WINDOW_H_ |
OLD | NEW |