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

Side by Side Diff: webkit/plugins/ppapi/ppb_widget_impl.h

Issue 10824386: Add SetScale to PPB_WidgetDev, use scale for painting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « webkit/plugins/ppapi/ppb_scrollbar_impl.cc ('k') | webkit/plugins/ppapi/ppb_widget_impl.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 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ppapi/c/pp_rect.h" 10 #include "ppapi/c/pp_rect.h"
(...skipping 19 matching lines...) Expand all
30 virtual ~PPB_Widget_Impl(); 30 virtual ~PPB_Widget_Impl();
31 31
32 // Resource overrides. 32 // Resource overrides.
33 virtual ::ppapi::thunk::PPB_Widget_API* AsPPB_Widget_API() OVERRIDE; 33 virtual ::ppapi::thunk::PPB_Widget_API* AsPPB_Widget_API() OVERRIDE;
34 34
35 // PPB_WidgetAPI implementation. 35 // PPB_WidgetAPI implementation.
36 virtual PP_Bool Paint(const PP_Rect* rect, PP_Resource ) OVERRIDE; 36 virtual PP_Bool Paint(const PP_Rect* rect, PP_Resource ) OVERRIDE;
37 virtual PP_Bool HandleEvent(PP_Resource pp_input_event) OVERRIDE; 37 virtual PP_Bool HandleEvent(PP_Resource pp_input_event) OVERRIDE;
38 virtual PP_Bool GetLocation(PP_Rect* location) OVERRIDE; 38 virtual PP_Bool GetLocation(PP_Rect* location) OVERRIDE;
39 virtual void SetLocation(const PP_Rect* location) OVERRIDE; 39 virtual void SetLocation(const PP_Rect* location) OVERRIDE;
40 virtual void SetScale(float scale) OVERRIDE;
40 41
41 // Notifies the plugin instance that the given rect needs to be repainted. 42 // Notifies the plugin instance that the given rect needs to be repainted.
42 void Invalidate(const PP_Rect* dirty); 43 void Invalidate(const PP_Rect* dirty);
43 44
44 protected: 45 protected:
45 virtual PP_Bool PaintInternal(const gfx::Rect& rect, 46 virtual PP_Bool PaintInternal(const gfx::Rect& rect,
46 PPB_ImageData_Impl* image) = 0; 47 PPB_ImageData_Impl* image) = 0;
47 virtual PP_Bool HandleEventInternal(const ::ppapi::InputEventData& data) = 0; 48 virtual PP_Bool HandleEventInternal(const ::ppapi::InputEventData& data) = 0;
48 virtual void SetLocationInternal(const PP_Rect* location) = 0; 49 virtual void SetLocationInternal(const PP_Rect* location) = 0;
49 50
50 PP_Rect location() const { return location_; } 51 PP_Rect location() const { return location_; }
52 float scale() const { return scale_; }
51 53
52 private: 54 private:
53 PP_Rect location_; 55 PP_Rect location_;
56 float scale_;
54 57
55 DISALLOW_COPY_AND_ASSIGN(PPB_Widget_Impl); 58 DISALLOW_COPY_AND_ASSIGN(PPB_Widget_Impl);
56 }; 59 };
57 60
58 } // namespace ppapi 61 } // namespace ppapi
59 } // namespace webkit 62 } // namespace webkit
60 63
61 #endif // WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_ 64 #endif // WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_scrollbar_impl.cc ('k') | webkit/plugins/ppapi/ppb_widget_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698