Chromium Code Reviews| 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..881106ffca082eb877ae6fb3e190a246ec76df82 100644 |
| --- a/remoting/client/jni/display_updater_factory.h |
| +++ b/remoting/client/jni/display_updater_factory.h |
| @@ -21,13 +21,24 @@ class VideoRenderer; |
| // returned object should be used on the network thread. |
| class DisplayUpdaterFactory { |
|
Sergey Ulanov
2016/09/19 21:14:56
Do we need to keep this interface? I think we need
Yuwei
2016/09/19 23:52:10
That's what I have considered. Removed.
|
| public: |
| - virtual ~DisplayUpdaterFactory() {} |
| + // A deleter that calls Destroy() to delete the factory. |
|
Lambros
2016/09/16 01:44:12
Does it make sense for this deleter (and Destroy m
Yuwei
2016/09/16 21:49:44
I don't have a strong opinion. My justifications a
|
| + struct Deleter { |
| + void operator()(DisplayUpdaterFactory* factory) { |
| + if (factory) { |
| + 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: |