OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_JNI_CHROMOTING_JNI_RUNTIME_H_ | 5 #ifndef REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ |
6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ | 6 #define REMOTING_CLIENT_JNI_CHROMOTING_JNI_RUNTIME_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void DisplayAuthenticationPrompt(bool pairing_supported); | 75 void DisplayAuthenticationPrompt(bool pairing_supported); |
76 | 76 |
77 // Saves new pairing credentials to permanent storage. Call on UI thread. | 77 // Saves new pairing credentials to permanent storage. Call on UI thread. |
78 void CommitPairingCredentials(const std::string& host, | 78 void CommitPairingCredentials(const std::string& host, |
79 const std::string& id, | 79 const std::string& id, |
80 const std::string& secret); | 80 const std::string& secret); |
81 | 81 |
82 // Updates image dimensions and canvas memory space. Call on display thread. | 82 // Updates image dimensions and canvas memory space. Call on display thread. |
83 void UpdateImageBuffer(int width, int height, jobject buffer); | 83 void UpdateImageBuffer(int width, int height, jobject buffer); |
84 | 84 |
| 85 // Updates cursor shape. Call on display thread. |
| 86 void UpdateCursorShape(const protocol::CursorShapeInfo& cursor_shape); |
| 87 |
85 // Draws the latest image buffer onto the canvas. Call on the display thread. | 88 // Draws the latest image buffer onto the canvas. Call on the display thread. |
86 void RedrawCanvas(); | 89 void RedrawCanvas(); |
87 | 90 |
88 private: | 91 private: |
89 ChromotingJniRuntime(); | 92 ChromotingJniRuntime(); |
90 | 93 |
91 // Forces a DisconnectFromHost() in case there is any active or failed | 94 // Forces a DisconnectFromHost() in case there is any active or failed |
92 // connection, then proceeds to tear down the Chromium dependencies on which | 95 // connection, then proceeds to tear down the Chromium dependencies on which |
93 // all sessions depended. Because destruction only occurs at application exit | 96 // all sessions depended. Because destruction only occurs at application exit |
94 // after all connections have terminated, it is safe to make unretained | 97 // after all connections have terminated, it is safe to make unretained |
(...skipping 24 matching lines...) Expand all Loading... |
119 scoped_refptr<ChromotingJniInstance> session_; | 122 scoped_refptr<ChromotingJniInstance> session_; |
120 | 123 |
121 friend struct DefaultSingletonTraits<ChromotingJniRuntime>; | 124 friend struct DefaultSingletonTraits<ChromotingJniRuntime>; |
122 | 125 |
123 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); | 126 DISALLOW_COPY_AND_ASSIGN(ChromotingJniRuntime); |
124 }; | 127 }; |
125 | 128 |
126 } // namespace remoting | 129 } // namespace remoting |
127 | 130 |
128 #endif | 131 #endif |
OLD | NEW |