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

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

Issue 10801003: Propagate DPI information to web-app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer feedback. Created 8 years, 5 months 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
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_view.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 for Pepper. It is 5 // This class is an implementation of the ChromotingView for Pepper. It is
6 // callable only on the Pepper thread. 6 // callable only on the Pepper thread.
7 7
8 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ 8 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_
9 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ 9 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_
10 10
(...skipping 30 matching lines...) Expand all
41 protocol::ErrorCode error) OVERRIDE; 41 protocol::ErrorCode error) OVERRIDE;
42 virtual protocol::ClipboardStub* GetClipboardStub() OVERRIDE; 42 virtual protocol::ClipboardStub* GetClipboardStub() OVERRIDE;
43 virtual protocol::CursorShapeStub* GetCursorShapeStub() OVERRIDE; 43 virtual protocol::CursorShapeStub* GetCursorShapeStub() OVERRIDE;
44 44
45 // FrameConsumer implementation. 45 // FrameConsumer implementation.
46 virtual void ApplyBuffer(const SkISize& view_size, 46 virtual void ApplyBuffer(const SkISize& view_size,
47 const SkIRect& clip_area, 47 const SkIRect& clip_area,
48 pp::ImageData* buffer, 48 pp::ImageData* buffer,
49 const SkRegion& region) OVERRIDE; 49 const SkRegion& region) OVERRIDE;
50 virtual void ReturnBuffer(pp::ImageData* buffer) OVERRIDE; 50 virtual void ReturnBuffer(pp::ImageData* buffer) OVERRIDE;
51 virtual void SetSourceSize(const SkISize& source_size) OVERRIDE; 51 virtual void SetSourceSize(const SkISize& source_size,
52 const SkIPoint& dpi) OVERRIDE;
52 53
53 // Sets the display size and clipping area of this view. 54 // Sets the display size and clipping area of this view.
54 void SetView(const SkISize& view_size, const SkIRect& clip_area); 55 void SetView(const SkISize& view_size, const SkIRect& clip_area);
55 56
56 // Return the client view and original host dimensions. 57 // Return the client view and original host dimensions.
57 const SkISize& get_view_size() const { 58 const SkISize& get_view_size() const {
58 return view_size_; 59 return view_size_;
59 } 60 }
60 const SkISize& get_screen_size() const { 61 const SkISize& get_screen_size() const {
61 return source_size_; 62 return source_size_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 104
104 // The size of the plugin element. 105 // The size of the plugin element.
105 SkISize view_size_; 106 SkISize view_size_;
106 107
107 // The current clip area rectangle. 108 // The current clip area rectangle.
108 SkIRect clip_area_; 109 SkIRect clip_area_;
109 110
110 // The size of the host screen. 111 // The size of the host screen.
111 SkISize source_size_; 112 SkISize source_size_;
112 113
114 // The DPI of the host screen.
115 SkIPoint source_dpi_;
116
113 // True if there is already a Flush() pending on the Graphics2D context. 117 // True if there is already a Flush() pending on the Graphics2D context.
114 bool flush_pending_; 118 bool flush_pending_;
115 119
116 // True after Initialize() has been called, until TearDown(). 120 // True after Initialize() has been called, until TearDown().
117 bool is_initialized_; 121 bool is_initialized_;
118 122
119 // True after the first call to ApplyBuffer(). 123 // True after the first call to ApplyBuffer().
120 bool frame_received_; 124 bool frame_received_;
121 125
122 DISALLOW_COPY_AND_ASSIGN(PepperView); 126 DISALLOW_COPY_AND_ASSIGN(PepperView);
123 }; 127 };
124 128
125 } // namespace remoting 129 } // namespace remoting
126 130
127 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_ 131 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIEW_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/plugin/pepper_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698