| 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 // This class is an implementation of the ChromotingView for Pepper. It is | 5 // This class is an implementation of the ChromotingView for Pepper. It is |
| 6 // callable only on the Pepper thread. | 6 // callable only on the Pepper thread. |
| 7 | 7 |
| 8 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 8 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
| 9 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 9 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 // Allocates buffers and passes them to the FrameProducer to render into until | 43 // Allocates buffers and passes them to the FrameProducer to render into until |
| 44 // the maximum number of buffers are in-flight. | 44 // the maximum number of buffers are in-flight. |
| 45 void Initialize(FrameProducer* producer); | 45 void Initialize(FrameProducer* producer); |
| 46 | 46 |
| 47 // FrameConsumer implementation. | 47 // FrameConsumer implementation. |
| 48 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, | 48 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, |
| 49 const webrtc::DesktopRect& clip_area, | 49 const webrtc::DesktopRect& clip_area, |
| 50 webrtc::DesktopFrame* buffer, | 50 webrtc::DesktopFrame* buffer, |
| 51 const webrtc::DesktopRegion& region, | 51 const webrtc::DesktopRegion& region, |
| 52 const webrtc::DesktopRegion& shape) OVERRIDE; | 52 const webrtc::DesktopRegion& shape) override; |
| 53 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; | 53 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) override; |
| 54 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, | 54 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, |
| 55 const webrtc::DesktopVector& dpi) OVERRIDE; | 55 const webrtc::DesktopVector& dpi) override; |
| 56 virtual PixelFormat GetPixelFormat() OVERRIDE; | 56 virtual PixelFormat GetPixelFormat() override; |
| 57 | 57 |
| 58 // Updates the PepperView's size & clipping area, taking into account the | 58 // Updates the PepperView's size & clipping area, taking into account the |
| 59 // DIP-to-device scale factor. | 59 // DIP-to-device scale factor. |
| 60 void SetView(const pp::View& view); | 60 void SetView(const pp::View& view); |
| 61 | 61 |
| 62 // Returns the dimensions of the most recently displayed frame, in pixels. | 62 // Returns the dimensions of the most recently displayed frame, in pixels. |
| 63 const webrtc::DesktopSize& get_source_size() const { | 63 const webrtc::DesktopSize& get_source_size() const { |
| 64 return source_size_; | 64 return source_size_; |
| 65 } | 65 } |
| 66 | 66 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 bool frame_received_; | 139 bool frame_received_; |
| 140 | 140 |
| 141 pp::CompletionCallbackFactory<PepperView> callback_factory_; | 141 pp::CompletionCallbackFactory<PepperView> callback_factory_; |
| 142 | 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(PepperView); | 143 DISALLOW_COPY_AND_ASSIGN(PepperView); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace remoting | 146 } // namespace remoting |
| 147 | 147 |
| 148 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 148 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
| OLD | NEW |