| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_JNI_DISPLAY_HANDLER_H_ | 5 #ifndef REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_ |
| 6 #define REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_ | 6 #define REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Handles display operations. Must be called and deleted on the display thread | 24 // Handles display operations. Must be called and deleted on the display thread |
| 25 // unless otherwise noted. | 25 // unless otherwise noted. |
| 26 class JniDisplayHandler : public DisplayUpdaterFactory { | 26 class JniDisplayHandler : public DisplayUpdaterFactory { |
| 27 public: | 27 public: |
| 28 explicit JniDisplayHandler(ChromotingJniRuntime* runtime); | 28 explicit JniDisplayHandler(ChromotingJniRuntime* runtime); |
| 29 | 29 |
| 30 // Must be deleted on the display thread. | 30 // Must be deleted on the display thread. |
| 31 ~JniDisplayHandler() override; | 31 ~JniDisplayHandler() override; |
| 32 | 32 |
| 33 base::android::ScopedJavaLocalRef<jobject> GetJavaDisplay(); | 33 base::android::ScopedJavaLocalRef<jobject> CreateDesktopViewFactory(); |
| 34 | 34 |
| 35 void UpdateCursorShape(const protocol::CursorShapeInfo& cursor_shape); | 35 void UpdateCursorShape(const protocol::CursorShapeInfo& cursor_shape); |
| 36 | 36 |
| 37 // DisplayUpdaterFactory overrides (functions can be called on any thread). | 37 // DisplayUpdaterFactory overrides (functions can be called on any thread). |
| 38 std::unique_ptr<protocol::CursorShapeStub> CreateCursorShapeStub() override; | 38 std::unique_ptr<protocol::CursorShapeStub> CreateCursorShapeStub() override; |
| 39 std::unique_ptr<protocol::VideoRenderer> CreateVideoRenderer() override; | 39 std::unique_ptr<protocol::VideoRenderer> CreateVideoRenderer() override; |
| 40 | 40 |
| 41 // Creates a new Bitmap object to store a video frame. Can be called on any | 41 // Creates a new Bitmap object to store a video frame. Can be called on any |
| 42 // thread. | 42 // thread. |
| 43 static base::android::ScopedJavaLocalRef<jobject> NewBitmap(int width, | 43 static base::android::ScopedJavaLocalRef<jobject> NewBitmap(int width, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 61 | 61 |
| 62 base::android::ScopedJavaGlobalRef<jobject> java_display_; | 62 base::android::ScopedJavaGlobalRef<jobject> java_display_; |
| 63 base::WeakPtrFactory<JniDisplayHandler> weak_factory_; | 63 base::WeakPtrFactory<JniDisplayHandler> weak_factory_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(JniDisplayHandler); | 65 DISALLOW_COPY_AND_ASSIGN(JniDisplayHandler); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // namespace remoting | 68 } // namespace remoting |
| 69 | 69 |
| 70 #endif // REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_ | 70 #endif // REMOTING_CLIENT_JNI_JNI_DISPLAY_HANDLER_H_ |
| OLD | NEW |