| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CHROMOTING_VIEW_H_ | 5 #ifndef REMOTING_CLIENT_CHROMOTING_VIEW_H_ |
| 6 #define REMOTING_CLIENT_CHROMOTING_VIEW_H_ | 6 #define REMOTING_CLIENT_CHROMOTING_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
| 9 #include "remoting/base/decoder.h" | 9 #include "remoting/base/decoder.h" |
| 10 | 10 |
| 11 namespace remoting { | 11 namespace remoting { |
| 12 | 12 |
| 13 // ChromotingView defines the behavior of an object that draws a view of the | 13 // ChromotingView defines the behavior of an object that draws a view of the |
| 14 // remote desktop. Its main function is to choose the right decoder and render | 14 // remote desktop. Its main function is to choose the right decoder and render |
| 15 // the update stream onto the screen. | 15 // the update stream onto the screen. |
| 16 class ChromotingView { | 16 class ChromotingView { |
| 17 public: | 17 public: |
| 18 ChromotingView(); | 18 ChromotingView(); |
| 19 virtual ~ChromotingView() {} | 19 virtual ~ChromotingView() {} |
| 20 | 20 |
| 21 // Get screen dimensions. |
| 22 // TODO(garykac): This will need to be extended to support multi-monitors. |
| 23 void GetScreenSize(int* width, int* height); |
| 24 |
| 21 // Initialize the common structures for the view. | 25 // Initialize the common structures for the view. |
| 22 virtual bool Initialize() = 0; | 26 virtual bool Initialize() = 0; |
| 23 | 27 |
| 24 // Free up resources allocated by this view. | 28 // Free up resources allocated by this view. |
| 25 virtual void TearDown() = 0; | 29 virtual void TearDown() = 0; |
| 26 | 30 |
| 27 // Tells the ChromotingView to paint the current image on the screen. | 31 // Tells the ChromotingView to paint the current image on the screen. |
| 28 // TODO(hclam): Add rects as parameter if needed. | 32 // TODO(hclam): Add rects as parameter if needed. |
| 29 virtual void Paint() = 0; | 33 virtual void Paint() = 0; |
| 30 | 34 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 int frame_width_; | 106 int frame_width_; |
| 103 int frame_height_; | 107 int frame_height_; |
| 104 | 108 |
| 105 UpdatedRects update_rects_; | 109 UpdatedRects update_rects_; |
| 106 UpdatedRects all_update_rects_; | 110 UpdatedRects all_update_rects_; |
| 107 }; | 111 }; |
| 108 | 112 |
| 109 } // namespace remoting | 113 } // namespace remoting |
| 110 | 114 |
| 111 #endif // REMOTING_CLIENT_CHROMOTING_VIEW_H_ | 115 #endif // REMOTING_CLIENT_CHROMOTING_VIEW_H_ |
| OLD | NEW |