| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 virtual ~PepperView(); | 43 virtual ~PepperView(); |
| 44 | 44 |
| 45 // FrameConsumer implementation. | 45 // FrameConsumer implementation. |
| 46 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, | 46 virtual void ApplyBuffer(const webrtc::DesktopSize& view_size, |
| 47 const webrtc::DesktopRect& clip_area, | 47 const webrtc::DesktopRect& clip_area, |
| 48 webrtc::DesktopFrame* buffer, | 48 webrtc::DesktopFrame* buffer, |
| 49 const webrtc::DesktopRegion& region) OVERRIDE; | 49 const webrtc::DesktopRegion& region) OVERRIDE; |
| 50 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; | 50 virtual void ReturnBuffer(webrtc::DesktopFrame* buffer) OVERRIDE; |
| 51 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, | 51 virtual void SetSourceSize(const webrtc::DesktopSize& source_size, |
| 52 const webrtc::DesktopVector& dpi) OVERRIDE; | 52 const webrtc::DesktopVector& dpi) OVERRIDE; |
| 53 virtual PixelFormat GetPixelFormat() OVERRIDE; |
| 53 | 54 |
| 54 // Updates the PepperView's size & clipping area, taking into account the | 55 // Updates the PepperView's size & clipping area, taking into account the |
| 55 // DIP-to-device scale factor. | 56 // DIP-to-device scale factor. |
| 56 void SetView(const pp::View& view); | 57 void SetView(const pp::View& view); |
| 57 | 58 |
| 58 // Returns the dimensions of the most recently displayed frame, in pixels. | 59 // Returns the dimensions of the most recently displayed frame, in pixels. |
| 59 const webrtc::DesktopSize& get_source_size() const { | 60 const webrtc::DesktopSize& get_source_size() const { |
| 60 return source_size_; | 61 return source_size_; |
| 61 } | 62 } |
| 62 | 63 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 bool frame_received_; | 146 bool frame_received_; |
| 146 | 147 |
| 147 pp::CompletionCallbackFactory<PepperView> callback_factory_; | 148 pp::CompletionCallbackFactory<PepperView> callback_factory_; |
| 148 | 149 |
| 149 DISALLOW_COPY_AND_ASSIGN(PepperView); | 150 DISALLOW_COPY_AND_ASSIGN(PepperView); |
| 150 }; | 151 }; |
| 151 | 152 |
| 152 } // namespace remoting | 153 } // namespace remoting |
| 153 | 154 |
| 154 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ | 155 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ |
| OLD | NEW |