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

Side by Side Diff: ppapi/proxy/graphics_2d_resource.h

Issue 1097393007: Update {virtual,override} to follow C++11 style in ppapi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split off one file into separate review. Created 5 years, 8 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
« no previous file with comments | « ppapi/proxy/gamepad_resource.h ('k') | ppapi/proxy/host_resolver_private_resource.h » ('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 PPAPI_PROXY_GRAPHICS_2D_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_GRAPHICS_2D_RESOURCE_H_
6 #define PPAPI_PROXY_GRAPHICS_2D_RESOURCE_H_ 6 #define PPAPI_PROXY_GRAPHICS_2D_RESOURCE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ppapi/proxy/plugin_resource.h" 9 #include "ppapi/proxy/plugin_resource.h"
10 #include "ppapi/proxy/ppapi_proxy_export.h" 10 #include "ppapi/proxy/ppapi_proxy_export.h"
11 #include "ppapi/thunk/ppb_graphics_2d_api.h" 11 #include "ppapi/thunk/ppb_graphics_2d_api.h"
12 12
13 namespace ppapi { 13 namespace ppapi {
14 14
15 class TrackedCallback; 15 class TrackedCallback;
16 16
17 namespace proxy { 17 namespace proxy {
18 18
19 class PPAPI_PROXY_EXPORT Graphics2DResource 19 class PPAPI_PROXY_EXPORT Graphics2DResource
20 : public PluginResource, 20 : public PluginResource,
21 public NON_EXPORTED_BASE(thunk::PPB_Graphics2D_API) { 21 public NON_EXPORTED_BASE(thunk::PPB_Graphics2D_API) {
22 public: 22 public:
23 Graphics2DResource(Connection connection, 23 Graphics2DResource(Connection connection,
24 PP_Instance instance, 24 PP_Instance instance,
25 const PP_Size& size, 25 const PP_Size& size,
26 PP_Bool is_always_opaque); 26 PP_Bool is_always_opaque);
27 27
28 virtual ~Graphics2DResource(); 28 ~Graphics2DResource() override;
29 29
30 // Resource overrides. 30 // Resource overrides.
31 virtual thunk::PPB_Graphics2D_API* AsPPB_Graphics2D_API() override; 31 thunk::PPB_Graphics2D_API* AsPPB_Graphics2D_API() override;
32 32
33 // PPB_Graphics2D_API overrides. 33 // PPB_Graphics2D_API overrides.
34 virtual PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque) override; 34 PP_Bool Describe(PP_Size* size, PP_Bool* is_always_opaque) override;
35 virtual void PaintImageData(PP_Resource image_data, 35 void PaintImageData(PP_Resource image_data,
36 const PP_Point* top_left, 36 const PP_Point* top_left,
37 const PP_Rect* src_rect) override; 37 const PP_Rect* src_rect) override;
38 virtual void Scroll(const PP_Rect* clip_rect, 38 void Scroll(const PP_Rect* clip_rect, const PP_Point* amount) override;
39 const PP_Point* amount) override; 39 void ReplaceContents(PP_Resource image_data) override;
40 virtual void ReplaceContents(PP_Resource image_data) override; 40 PP_Bool SetScale(float scale) override;
41 virtual PP_Bool SetScale(float scale) override; 41 float GetScale() override;
42 virtual float GetScale() override; 42 int32_t Flush(scoped_refptr<TrackedCallback> callback) override;
43 virtual int32_t Flush(scoped_refptr<TrackedCallback> callback) override; 43 bool ReadImageData(PP_Resource image, const PP_Point* top_left) override;
44 virtual bool ReadImageData(PP_Resource image,
45 const PP_Point* top_left) override;
46 44
47 private: 45 private:
48 void OnPluginMsgFlushACK(const ResourceMessageReplyParams& params); 46 void OnPluginMsgFlushACK(const ResourceMessageReplyParams& params);
49 47
50 const PP_Size size_; 48 const PP_Size size_;
51 const PP_Bool is_always_opaque_; 49 const PP_Bool is_always_opaque_;
52 float scale_; 50 float scale_;
53 51
54 scoped_refptr<TrackedCallback> current_flush_callback_; 52 scoped_refptr<TrackedCallback> current_flush_callback_;
55 53
56 DISALLOW_COPY_AND_ASSIGN(Graphics2DResource); 54 DISALLOW_COPY_AND_ASSIGN(Graphics2DResource);
57 }; 55 };
58 56
59 } // namespace proxy 57 } // namespace proxy
60 } // namespace ppapi 58 } // namespace ppapi
61 59
62 #endif // PPAPI_PROXY_GRAPHICS_2D_RESOURCE_H_ 60 #endif // PPAPI_PROXY_GRAPHICS_2D_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/gamepad_resource.h ('k') | ppapi/proxy/host_resolver_private_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698