Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Unified Diff: remoting/client/jni/jni_frame_consumer.cc

Issue 2027783002: Revert of [Android Client] Move session-scoped native interface into JniClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/jni/jni_frame_consumer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/jni_frame_consumer.cc
diff --git a/remoting/client/jni/jni_frame_consumer.cc b/remoting/client/jni/jni_frame_consumer.cc
index 71c9b148d8d9b4cc74e90fe64e70aafcbde85c54..1e3fc0951e65ed73cc880feb51ba76b7097aeed2 100644
--- a/remoting/client/jni/jni_frame_consumer.cc
+++ b/remoting/client/jni/jni_frame_consumer.cc
@@ -13,7 +13,6 @@
#include "remoting/base/util.h"
#include "remoting/client/jni/chromoting_jni_instance.h"
#include "remoting/client/jni/chromoting_jni_runtime.h"
-#include "remoting/client/jni/jni_client.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_region.h"
#include "ui/gfx/android/java_bitmap.h"
@@ -22,9 +21,7 @@
class JniFrameConsumer::Renderer {
public:
- Renderer(ChromotingJniRuntime* jni_runtime, JniClient* jni_client) :
- jni_runtime_(jni_runtime),
- jni_client_(jni_client) {}
+ Renderer(ChromotingJniRuntime* jni_runtime) : jni_runtime_(jni_runtime) {}
~Renderer() {
DCHECK(jni_runtime_->display_task_runner()->BelongsToCurrentThread());
}
@@ -34,8 +31,6 @@
private:
// Used to obtain task runner references and make calls to Java methods.
ChromotingJniRuntime* jni_runtime_;
-
- JniClient* jni_client_;
// This global reference is required, instead of a local reference, so it
// remains valid for the lifetime of |bitmap_| - gfx::JavaBitmap does not
@@ -62,10 +57,10 @@
bitmap_.reset();
bitmap_global_ref_.Reset(
env,
- jni_client_->NewBitmap(frame->size().width(), frame->size().height())
+ jni_runtime_->NewBitmap(frame->size().width(), frame->size().height())
.obj());
bitmap_.reset(new gfx::JavaBitmap(bitmap_global_ref_.obj()));
- jni_client_->UpdateFrameBitmap(bitmap_global_ref_.obj());
+ jni_runtime_->UpdateFrameBitmap(bitmap_global_ref_.obj());
}
// Copy pixels from |frame| into the Java Bitmap.
@@ -84,13 +79,12 @@
bitmap_->stride(), buffer_rect, i.rect());
}
- jni_client_->RedrawCanvas();
+ jni_runtime_->RedrawCanvas();
}
-JniFrameConsumer::JniFrameConsumer(ChromotingJniRuntime* jni_runtime,
- JniClient* jni_client)
+JniFrameConsumer::JniFrameConsumer(ChromotingJniRuntime* jni_runtime)
: jni_runtime_(jni_runtime),
- renderer_(new Renderer(jni_runtime, jni_client)),
+ renderer_(new Renderer(jni_runtime)),
weak_factory_(this) {}
JniFrameConsumer::~JniFrameConsumer() {
« no previous file with comments | « remoting/client/jni/jni_frame_consumer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698