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 #include "remoting/protocol/cursor_shape_stub.h" | |
10 | 11 |
11 namespace remoting { | 12 namespace remoting { |
12 | 13 |
13 namespace protocol { | 14 namespace protocol { |
14 class ClipboardStub; | 15 class ClipboardStub; |
15 } // namespace protocol | 16 } // namespace protocol |
16 | 17 |
17 // ChromotingView defines the behavior of an object that draws a view of the | 18 // ChromotingView defines the behavior of an object that draws a view of the |
18 // remote desktop. Its main function is to render the update stream onto the | 19 // remote desktop. Its main function is to render the update stream onto the |
19 // screen. | 20 // screen. |
20 class ChromotingView { | 21 class ChromotingView : public protocol::CursorShapeStub { |
Wez
2012/05/23 00:01:57
Expose CursorShapeStub via a getter, as for Clipbo
garykac
2012/05/26 01:58:01
ClipboardStub is a getter because is passes the me
Wez
2012/05/29 18:02:54
That's a detail of this implementation, not intrin
| |
21 public: | 22 public: |
22 virtual ~ChromotingView() {} | 23 virtual ~ChromotingView() {} |
23 | 24 |
24 // Initialize the common structures for the view. | 25 // Initialize the common structures for the view. |
25 virtual bool Initialize() = 0; | 26 virtual bool Initialize() = 0; |
26 | 27 |
27 // Free up resources allocated by this view. | 28 // Free up resources allocated by this view. |
28 virtual void TearDown() = 0; | 29 virtual void TearDown() = 0; |
29 | 30 |
30 // Record the update the state of the connection, updating the UI as needed. | 31 // Record the update the state of the connection, updating the UI as needed. |
31 virtual void SetConnectionState(protocol::ConnectionToHost::State state, | 32 virtual void SetConnectionState(protocol::ConnectionToHost::State state, |
32 protocol::ErrorCode error) = 0; | 33 protocol::ErrorCode error) = 0; |
33 | 34 |
34 // Get the view's ClipboardStub implementation. | 35 // Get the view's ClipboardStub implementation. |
35 virtual protocol::ClipboardStub* GetClipboardStub() = 0; | 36 virtual protocol::ClipboardStub* GetClipboardStub() = 0; |
36 }; | 37 }; |
37 | 38 |
38 } // namespace remoting | 39 } // namespace remoting |
39 | 40 |
40 #endif // REMOTING_CLIENT_CHROMOTING_VIEW_H_ | 41 #endif // REMOTING_CLIENT_CHROMOTING_VIEW_H_ |
OLD | NEW |