OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 5 #ifndef UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
6 #define UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 6 #define UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
7 | 7 |
8 #include <d3d9.h> | 8 #include <d3d9.h> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // Schedule the presenter to release its reference to the shared surface. | 56 // Schedule the presenter to release its reference to the shared surface. |
57 void ReleaseSurface(); | 57 void ReleaseSurface(); |
58 | 58 |
59 // The public member functions are called on the main thread. | 59 // The public member functions are called on the main thread. |
60 bool Present(HDC dc); | 60 bool Present(HDC dc); |
61 bool CopyTo(const gfx::Rect& src_subrect, | 61 bool CopyTo(const gfx::Rect& src_subrect, |
62 const gfx::Size& dst_size, | 62 const gfx::Size& dst_size, |
63 void* buf); | 63 void* buf); |
64 void Invalidate(); | 64 void Invalidate(); |
65 | 65 |
| 66 void SetNewTargetWindow(gfx::PluginWindowHandle window); |
| 67 |
66 private: | 68 private: |
67 friend class base::RefCountedThreadSafe<AcceleratedPresenter>; | 69 friend class base::RefCountedThreadSafe<AcceleratedPresenter>; |
68 | 70 |
69 ~AcceleratedPresenter(); | 71 ~AcceleratedPresenter(); |
70 | 72 |
71 // These member functions are called on the PresentThread with which the | 73 // These member functions are called on the PresentThread with which the |
72 // presenter has affinity. | 74 // presenter has affinity. |
73 void DoPresentAndAcknowledge( | 75 void DoPresentAndAcknowledge( |
74 const gfx::Size& size, | 76 const gfx::Size& size, |
75 int64 surface_handle, | 77 int64 surface_handle, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 143 |
142 // Indicates that the surface has become invisible. | 144 // Indicates that the surface has become invisible. |
143 void WasHidden(); | 145 void WasHidden(); |
144 | 146 |
145 private: | 147 private: |
146 const scoped_refptr<AcceleratedPresenter> presenter_; | 148 const scoped_refptr<AcceleratedPresenter> presenter_; |
147 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); | 149 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurface); |
148 }; | 150 }; |
149 | 151 |
150 #endif // UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ | 152 #endif // UI_SURFACE_ACCELERATED_SURFACE_WIN_H_ |
OLD | NEW |