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 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 | 11 |
12 class ChromotingHostMessage; | 12 class HostMessage; |
13 | 13 |
14 // ChromotingView defines the behavior of an object that draws a view of the | 14 // ChromotingView defines the behavior of an object that draws a view of the |
15 // remote desktop. Its main function is to choose the right decoder and render | 15 // remote desktop. Its main function is to choose the right decoder and render |
16 // the update stream onto the screen. | 16 // the update stream onto the screen. |
17 class ChromotingView { | 17 class ChromotingView { |
18 public: | 18 public: |
19 virtual ~ChromotingView() {} | 19 virtual ~ChromotingView() {} |
20 | 20 |
21 // Initialize the common structures for the view. | 21 // Initialize the common structures for the view. |
22 virtual bool Initialize() = 0; | 22 virtual bool Initialize() = 0; |
(...skipping 17 matching lines...) Expand all Loading... |
40 // extends past the end of the backing store, it is filled with black. | 40 // extends past the end of the backing store, it is filled with black. |
41 virtual void SetViewport(int x, int y, int width, int height) = 0; | 41 virtual void SetViewport(int x, int y, int width, int height) = 0; |
42 | 42 |
43 // Resize the underlying image that contains the host screen buffer. | 43 // Resize the underlying image that contains the host screen buffer. |
44 // This should match the size of the output from the decoder. | 44 // This should match the size of the output from the decoder. |
45 // | 45 // |
46 // TODO(garykac): This handles only 1 screen. We need multi-screen support. | 46 // TODO(garykac): This handles only 1 screen. We need multi-screen support. |
47 virtual void SetHostScreenSize(int width, int height) = 0; | 47 virtual void SetHostScreenSize(int width, int height) = 0; |
48 | 48 |
49 // Handle the BeginUpdateStream message. | 49 // Handle the BeginUpdateStream message. |
50 virtual void HandleBeginUpdateStream(ChromotingHostMessage* msg) = 0; | 50 virtual void HandleBeginUpdateStream(HostMessage* msg) = 0; |
51 | 51 |
52 // Handle the UpdateStreamPacket message. | 52 // Handle the UpdateStreamPacket message. |
53 virtual void HandleUpdateStreamPacket(ChromotingHostMessage* msg) = 0; | 53 virtual void HandleUpdateStreamPacket(HostMessage* msg) = 0; |
54 | 54 |
55 // Handle the EndUpdateStream message. | 55 // Handle the EndUpdateStream message. |
56 virtual void HandleEndUpdateStream(ChromotingHostMessage* msg) = 0; | 56 virtual void HandleEndUpdateStream(HostMessage* msg) = 0; |
57 }; | 57 }; |
58 | 58 |
59 } // namespace remoting | 59 } // namespace remoting |
60 | 60 |
61 #endif // REMOTING_CLIENT_CHROMOTING_VIEW_H_ | 61 #endif // REMOTING_CLIENT_CHROMOTING_VIEW_H_ |
OLD | NEW |