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

Side by Side Diff: remoting/client/plugin/pepper_view_proxy.h

Issue 8985007: Refactoring of the client-side input pipeline and scaling dimension management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 29
30 class PepperViewProxy : public base::RefCountedThreadSafe<PepperViewProxy>, 30 class PepperViewProxy : public base::RefCountedThreadSafe<PepperViewProxy>,
Sergey Ulanov 2011/12/20 00:05:35 FYI: We don't need this class anymore - network an
Wez 2011/12/20 07:14:14 OK, gone!
31 public ChromotingView, 31 public ChromotingView,
32 public FrameConsumer { 32 public FrameConsumer {
33 public: 33 public:
34 PepperViewProxy(ChromotingInstance* instance, PepperView* view, 34 PepperViewProxy(ChromotingInstance* instance, PepperView* view,
35 base::MessageLoopProxy* plugin_message_loop); 35 base::MessageLoopProxy* plugin_message_loop);
36 virtual ~PepperViewProxy(); 36 virtual ~PepperViewProxy();
37 37
38 // ChromotingView implementation. 38 // ChromotingView implementation.
39 virtual bool Initialize() OVERRIDE; 39 virtual bool Initialize() OVERRIDE;
40 virtual void TearDown() OVERRIDE; 40 virtual void TearDown() OVERRIDE;
41 virtual void Paint() OVERRIDE; 41 virtual void Paint() OVERRIDE;
42 virtual void SetSolidFill(uint32 color) OVERRIDE; 42 virtual void SetSolidFill(uint32 color) OVERRIDE;
43 virtual void UnsetSolidFill() OVERRIDE; 43 virtual void UnsetSolidFill() OVERRIDE;
44 virtual void SetConnectionState( 44 virtual void SetConnectionState(
45 protocol::ConnectionToHost::State state, 45 protocol::ConnectionToHost::State state,
46 protocol::ConnectionToHost::Error error) OVERRIDE; 46 protocol::ConnectionToHost::Error error) OVERRIDE;
47 47
48 // This method returns a value, so must run synchronously, so must be
49 // called only on the pepper thread.
50 virtual double GetHorizontalScaleRatio() const OVERRIDE;
51 virtual double GetVerticalScaleRatio() const OVERRIDE;
52
53 // FrameConsumer implementation. 48 // FrameConsumer implementation.
54 virtual void AllocateFrame(media::VideoFrame::Format format, 49 virtual void AllocateFrame(media::VideoFrame::Format format,
55 const SkISize& size, 50 const SkISize& size,
56 scoped_refptr<media::VideoFrame>* frame_out, 51 scoped_refptr<media::VideoFrame>* frame_out,
57 const base::Closure& done) OVERRIDE; 52 const base::Closure& done) OVERRIDE;
58 virtual void ReleaseFrame(media::VideoFrame* frame) OVERRIDE; 53 virtual void ReleaseFrame(media::VideoFrame* frame) OVERRIDE;
59 virtual void OnPartialFrameOutput(media::VideoFrame* frame, 54 virtual void OnPartialFrameOutput(media::VideoFrame* frame,
60 RectVector* rects, 55 RectVector* rects,
61 const base::Closure& done) OVERRIDE; 56 const base::Closure& done) OVERRIDE;
62 57
(...skipping 15 matching lines...) Expand all
78 PepperView* view_; 73 PepperView* view_;
79 74
80 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_; 75 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_;
81 76
82 DISALLOW_COPY_AND_ASSIGN(PepperViewProxy); 77 DISALLOW_COPY_AND_ASSIGN(PepperViewProxy);
83 }; 78 };
84 79
85 } // namespace remoting 80 } // namespace remoting
86 81
87 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_ 82 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698