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 #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/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "remoting/protocol/connection_to_host.h" | 9 #include "remoting/protocol/connection_to_host.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 render the update stream onto the | 14 // remote desktop. Its main function is to render the update stream onto the |
15 // screen. | 15 // screen. |
16 class ChromotingView { | 16 class ChromotingView { |
17 public: | 17 public: |
18 virtual ~ChromotingView() {} | 18 virtual ~ChromotingView() {} |
19 | 19 |
20 // Initialize the common structures for the view. | 20 // Initialize the common structures for the view. |
21 virtual bool Initialize() = 0; | 21 virtual bool Initialize() = 0; |
22 | 22 |
23 // Free up resources allocated by this view. | 23 // Free up resources allocated by this view. |
24 virtual void TearDown() = 0; | 24 virtual void TearDown() = 0; |
25 | 25 |
26 // Record the update the state of the connection, updating the UI as needed. | 26 // Record the update the state of the connection, updating the UI as needed. |
27 virtual void SetConnectionState(protocol::ConnectionToHost::State state, | 27 virtual void SetConnectionState(protocol::ConnectionToHost::State state, |
28 protocol::ConnectionToHost::Error error) = 0; | 28 protocol::ErrorCode error) = 0; |
29 }; | 29 }; |
30 | 30 |
31 } // namespace remoting | 31 } // namespace remoting |
32 | 32 |
33 #endif // REMOTING_CLIENT_CHROMOTING_VIEW_H_ | 33 #endif // REMOTING_CLIENT_CHROMOTING_VIEW_H_ |
OLD | NEW |