| 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 REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ |
| 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ | 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ |
| 7 | 7 |
| 8 #include "remoting/protocol/video_renderer.h" | 8 #include "remoting/protocol/video_renderer.h" |
| 9 | 9 |
| 10 namespace webrtc { | 10 namespace webrtc { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // Called when the first frame is received. | 40 // Called when the first frame is received. |
| 41 virtual void OnVideoFirstFrameReceived() = 0; | 41 virtual void OnVideoFirstFrameReceived() = 0; |
| 42 | 42 |
| 43 // Called with each frame's updated region, if EnableDebugDirtyRegion(true) | 43 // Called with each frame's updated region, if EnableDebugDirtyRegion(true) |
| 44 // was called. | 44 // was called. |
| 45 virtual void OnVideoFrameDirtyRegion( | 45 virtual void OnVideoFrameDirtyRegion( |
| 46 const webrtc::DesktopRegion& dirty_region) = 0; | 46 const webrtc::DesktopRegion& dirty_region) = 0; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 // Initializes the renderer. |instance| and |event_handler| must outlive the | 49 // Sets pepper context. Must be called before Initialize(). |instance| and |
| 50 // renderer. Returns false if the renderer cannot be initialized. | 50 // |event_handler| must outlive the renderer. |
| 51 virtual bool Initialize(pp::Instance* instance, | 51 virtual void SetPepperContext(pp::Instance* instance, |
| 52 const ClientContext& context, | 52 EventHandler* event_handler) = 0; |
| 53 EventHandler* event_handler, | |
| 54 protocol::PerformanceTracker* perf_tracker) = 0; | |
| 55 | 53 |
| 56 // Must be called whenever the plugin view changes. | 54 // Must be called whenever the plugin view changes. |
| 57 virtual void OnViewChanged(const pp::View& view) = 0; | 55 virtual void OnViewChanged(const pp::View& view) = 0; |
| 58 | 56 |
| 59 // Enables or disables delivery of dirty region information to the | 57 // Enables or disables delivery of dirty region information to the |
| 60 // EventHandler, for debugging purposes. | 58 // EventHandler, for debugging purposes. |
| 61 virtual void EnableDebugDirtyRegion(bool enable) = 0; | 59 virtual void EnableDebugDirtyRegion(bool enable) = 0; |
| 62 }; | 60 }; |
| 63 | 61 |
| 64 } // namespace remoting | 62 } // namespace remoting |
| 65 | 63 |
| 66 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ | 64 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ |
| OLD | NEW |