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

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

Issue 8493020: Move code in src/remoting to the new callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: - Created 9 years, 1 month 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
« no previous file with comments | « remoting/client/plugin/pepper_view.cc ('k') | remoting/client/plugin/pepper_view_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 protocol::ConnectionToHost::State state, 46 protocol::ConnectionToHost::State state,
47 protocol::ConnectionToHost::Error error) OVERRIDE; 47 protocol::ConnectionToHost::Error error) OVERRIDE;
48 48
49 // This method returns a value, so must run synchronously, so must be 49 // This method returns a value, so must run synchronously, so must be
50 // called only on the pepper thread. 50 // called only on the pepper thread.
51 virtual double GetHorizontalScaleRatio() const OVERRIDE; 51 virtual double GetHorizontalScaleRatio() const OVERRIDE;
52 virtual double GetVerticalScaleRatio() const OVERRIDE; 52 virtual double GetVerticalScaleRatio() const OVERRIDE;
53 53
54 // FrameConsumer implementation. 54 // FrameConsumer implementation.
55 virtual void AllocateFrame(media::VideoFrame::Format format, 55 virtual void AllocateFrame(media::VideoFrame::Format format,
56 size_t width, 56 const SkISize& size,
57 size_t height,
58 base::TimeDelta timestamp,
59 base::TimeDelta duration,
60 scoped_refptr<media::VideoFrame>* frame_out, 57 scoped_refptr<media::VideoFrame>* frame_out,
61 Task* done); 58 const base::Closure& done) OVERRIDE;
62 virtual void ReleaseFrame(media::VideoFrame* frame); 59 virtual void ReleaseFrame(media::VideoFrame* frame) OVERRIDE;
63 virtual void OnPartialFrameOutput(media::VideoFrame* frame, 60 virtual void OnPartialFrameOutput(media::VideoFrame* frame,
64 RectVector* rects, 61 RectVector* rects,
65 Task* done); 62 const base::Closure& done) OVERRIDE;
66 63
67 // Remove the reference to |instance_| and |view_| by setting the value to 64 // Remove the reference to |instance_| and |view_| by setting the value to
68 // NULL. 65 // NULL.
69 // This method should only be called on pepper thread. 66 // This method should only be called on pepper thread.
70 void Detach(); 67 void Detach();
71 68
72 private: 69 private:
73 // This variable is accessed on chromoting threads and pepper thread. 70 // This variable is accessed on chromoting threads and pepper thread.
74 // This is initialized when this object is constructed. Its value is reset 71 // This is initialized when this object is constructed. Its value is reset
75 // to NULL on pepper thread when Detach() is called and there will be no 72 // to NULL on pepper thread when Detach() is called and there will be no
76 // other threads accessing this variable at the same time. Given the above 73 // other threads accessing this variable at the same time. Given the above
77 // conditions locking this variable is not necessary. 74 // conditions locking this variable is not necessary.
78 ChromotingInstance* instance_; 75 ChromotingInstance* instance_;
79 76
80 // This variable is only accessed on the pepper thread. Locking is not 77 // This variable is only accessed on the pepper thread. Locking is not
81 // necessary. 78 // necessary.
82 PepperView* view_; 79 PepperView* view_;
83 80
84 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_; 81 scoped_refptr<base::MessageLoopProxy> plugin_message_loop_;
85 82
86 DISALLOW_COPY_AND_ASSIGN(PepperViewProxy); 83 DISALLOW_COPY_AND_ASSIGN(PepperViewProxy);
87 }; 84 };
88 85
89 } // namespace remoting 86 } // namespace remoting
90 87
91 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_ 88 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_PROXY_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_view.cc ('k') | remoting/client/plugin/pepper_view_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698