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

Unified Diff: remoting/client/jni/display_updater_factory.h

Issue 2338473002: [Remoting Android] JniGlDisplayHandler calls invalidate() on UI thread (Closed)
Patch Set: Reviewer's Feedback Created 4 years, 3 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
Index: remoting/client/jni/display_updater_factory.h
diff --git a/remoting/client/jni/display_updater_factory.h b/remoting/client/jni/display_updater_factory.h
index 9826e96117137831fd4f7e5d1928deef7508fcdc..e6bb6defdbc7c596b8ffd583b6b80a62524d3f55 100644
--- a/remoting/client/jni/display_updater_factory.h
+++ b/remoting/client/jni/display_updater_factory.h
@@ -21,13 +21,22 @@ class VideoRenderer;
// returned object should be used on the network thread.
class DisplayUpdaterFactory {
Hzj_jie 2016/09/13 19:32:12 Will this class be removed eventually? It looks li
Yuwei 2016/09/13 20:49:40 I'm thinking about removing this class but just no
public:
- virtual ~DisplayUpdaterFactory() {}
+ // A deleter that calls Destroy() to delete the factory.
+ struct Deleter {
+ void operator()(DisplayUpdaterFactory* factory) {
Hzj_jie 2016/09/13 19:32:12 if (factory) { factory->Destroy(); } I happen t
Yuwei 2016/09/13 20:49:40 Added the null-check.
+ factory->Destroy();
+ }
+ };
virtual std::unique_ptr<protocol::CursorShapeStub>
CreateCursorShapeStub() = 0;
virtual std::unique_ptr<protocol::VideoRenderer> CreateVideoRenderer() = 0;
+ // Destroys the factory object and frees the memory.
+ virtual void Destroy() = 0;
+
protected:
+ virtual ~DisplayUpdaterFactory() {}
DisplayUpdaterFactory() {}
private:

Powered by Google App Engine
This is Rietveld 408576698