| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // PepperViewProxy is used to invoke PepperView object on pepper thread. It | 5 // PepperViewProxy is used to invoke PepperView object on pepper thread. It |
| 6 // has the same interface as PepperView. When a method calls is received on | 6 // has the same interface as PepperView. When a method calls is received on |
| 7 // any chromoting threads it delegates the method call to pepper thread. | 7 // any chromoting threads it delegates the method call to pepper thread. |
| 8 // It also provide a detach mechanism so that when PepperView object is | 8 // It also provide a detach mechanism so that when PepperView object is |
| 9 // destroyed PepperViewProxy will not call it anymore. This is important in | 9 // destroyed PepperViewProxy will not call it anymore. This is important in |
| 10 // providing a safe shutdown of ChromotingInstance and PepperView. | 10 // providing a safe shutdown of ChromotingInstance and PepperView. |
| 11 | 11 |
| 12 // This object is accessed on chromoting threads and pepper thread. The internal | 12 // This object is accessed on chromoting threads and pepper thread. The internal |
| 13 // PepperView object is only accessed on pepper thread so as the Detach() method | 13 // PepperView object is only accessed on pepper thread so as the Detach() method |
| 14 // call. | 14 // call. |
| 15 | 15 |
| 16 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_ | 16 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_ |
| 17 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_ | 17 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_ |
| 18 | 18 |
| 19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
| 20 #include "remoting/client/plugin/pepper_view.h" | 20 #include "remoting/client/plugin/pepper_view.h" |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 class MessageLoopProxy; | 23 class MessageLoopProxy; |
| 24 } // namespace base | 24 } // namespace base |
| 25 | 25 |
| 26 namespace remoting { | 26 namespace remoting { |
| 27 | 27 |
| 28 class ChromotingInstance; | 28 class ChromotingInstance; |
| 29 class ClientContext; | |
| 30 | 29 |
| 31 class PepperViewProxy : public base::RefCountedThreadSafe<PepperViewProxy>, | 30 class PepperViewProxy : public base::RefCountedThreadSafe<PepperViewProxy>, |
| 32 public ChromotingView, | 31 public ChromotingView, |
| 33 public FrameConsumer { | 32 public FrameConsumer { |
| 34 public: | 33 public: |
| 35 PepperViewProxy(ChromotingInstance* instance, PepperView* view, | 34 PepperViewProxy(ChromotingInstance* instance, PepperView* view, |
| 36 base::MessageLoopProxy* plugin_message_loop); | 35 base::MessageLoopProxy* plugin_message_loop); |
| 37 virtual ~PepperViewProxy(); | 36 virtual ~PepperViewProxy(); |
| 38 | 37 |
| 39 // ChromotingView implementation. | 38 // ChromotingView implementation. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 PepperView* view_; | 78 PepperView* view_; |
| 80 | 79 |
| 81 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_; | 80 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_; |
| 82 | 81 |
| 83 DISALLOW_COPY_AND_ASSIGN(PepperViewProxy); | 82 DISALLOW_COPY_AND_ASSIGN(PepperViewProxy); |
| 84 }; | 83 }; |
| 85 | 84 |
| 86 } // namespace remoting | 85 } // namespace remoting |
| 87 | 86 |
| 88 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_ | 87 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_ |
| OLD | NEW |