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

Side by Side Diff: remoting/client/plugin/pepper_view.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 // This class is an implementation of the ChromotingView using Pepper devices 5 // This class is an implementation of the ChromotingView using Pepper devices
6 // as the backing stores. This class is used only on pepper thread. 6 // as the backing stores. This class is used only on pepper thread.
7 // Chromoting objects access this object through PepperViewProxy which 7 // Chromoting objects access this object through PepperViewProxy which
8 // delegates method calls on the pepper thread. 8 // delegates method calls on the pepper thread.
9 9
10 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ 10 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_
(...skipping 24 matching lines...) Expand all
35 35
36 // ChromotingView implementation. 36 // ChromotingView implementation.
37 virtual bool Initialize() OVERRIDE; 37 virtual bool Initialize() OVERRIDE;
38 virtual void TearDown() OVERRIDE; 38 virtual void TearDown() OVERRIDE;
39 virtual void Paint() OVERRIDE; 39 virtual void Paint() OVERRIDE;
40 virtual void SetSolidFill(uint32 color) OVERRIDE; 40 virtual void SetSolidFill(uint32 color) OVERRIDE;
41 virtual void UnsetSolidFill() OVERRIDE; 41 virtual void UnsetSolidFill() OVERRIDE;
42 virtual void SetConnectionState( 42 virtual void SetConnectionState(
43 protocol::ConnectionToHost::State state, 43 protocol::ConnectionToHost::State state,
44 protocol::ConnectionToHost::Error error) OVERRIDE; 44 protocol::ConnectionToHost::Error error) OVERRIDE;
45 virtual double GetHorizontalScaleRatio() const OVERRIDE;
46 virtual double GetVerticalScaleRatio() const OVERRIDE;
47 45
48 // FrameConsumer implementation. 46 // FrameConsumer implementation.
49 virtual void AllocateFrame(media::VideoFrame::Format format, 47 virtual void AllocateFrame(media::VideoFrame::Format format,
50 const SkISize& size, 48 const SkISize& size,
51 scoped_refptr<media::VideoFrame>* frame_out, 49 scoped_refptr<media::VideoFrame>* frame_out,
52 const base::Closure& done) OVERRIDE; 50 const base::Closure& done) OVERRIDE;
53 virtual void ReleaseFrame(media::VideoFrame* frame) OVERRIDE; 51 virtual void ReleaseFrame(media::VideoFrame* frame) OVERRIDE;
54 virtual void OnPartialFrameOutput(media::VideoFrame* frame, 52 virtual void OnPartialFrameOutput(media::VideoFrame* frame,
55 RectVector* rects, 53 RectVector* rects,
56 const base::Closure& done) OVERRIDE; 54 const base::Closure& done) OVERRIDE;
57 55
58 // This is called when the dimension of the plugin element has changed. 56 // This is called when the dimension of the plugin element has changed.
59 // Return true if plugin size has changed, false otherwise. 57 // Return true if plugin size has changed, false otherwise.
60 bool SetPluginSize(const SkISize& plugin_size); 58 bool SetPluginSize(const SkISize& plugin_size);
61 59
60 // Return the client view, and original host dimensions.
61 SkISize GetViewDimensions() const;
Sergey Ulanov 2011/12/20 00:05:35 can this be inline view_dimentions()? Also, I thin
Wez 2011/12/20 07:14:14 Done. I've also renamed member |plugin_size_| to
62 SkISize GetHostDimensions() const;
63
62 private: 64 private:
63 void OnPaintDone(base::Time paint_start); 65 void OnPaintDone(base::Time paint_start);
64 66
65 // Set the dimension of the entire host screen. 67 // Set the dimension of the entire host screen.
66 void SetHostSize(const SkISize& host_size); 68 void SetHostSize(const SkISize& host_size);
67 69
68 void PaintFrame(media::VideoFrame* frame, RectVector* rects); 70 void PaintFrame(media::VideoFrame* frame, RectVector* rects);
69 71
70 // Render the rectangle of |frame| to the backing store. 72 // Render the rectangle of |frame| to the backing store.
71 // Returns true if this rectangle is not clipped. 73 // Returns true if this rectangle is not clipped.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 uint32 static_fill_color_; 106 uint32 static_fill_color_;
105 107
106 ScopedRunnableMethodFactory<PepperView> task_factory_; 108 ScopedRunnableMethodFactory<PepperView> task_factory_;
107 109
108 DISALLOW_COPY_AND_ASSIGN(PepperView); 110 DISALLOW_COPY_AND_ASSIGN(PepperView);
109 }; 111 };
110 112
111 } // namespace remoting 113 } // namespace remoting
112 114
113 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ 115 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698