| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CPP_DEV_WIDGET_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_WIDGET_DEV_H_ |
| 6 #define PPAPI_CPP_DEV_WIDGET_DEV_H_ | 6 #define PPAPI_CPP_DEV_WIDGET_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_stdint.h" | 8 #include "ppapi/c/pp_stdint.h" |
| 9 #include "ppapi/cpp/resource.h" | 9 #include "ppapi/cpp/resource.h" |
| 10 | 10 |
| 11 struct PP_InputEvent; | 11 struct PP_InputEvent; |
| 12 | 12 |
| 13 namespace pp { | 13 namespace pp { |
| 14 | 14 |
| 15 class ImageData; | 15 class ImageData; |
| 16 class Instance; | 16 class Instance; |
| 17 class Rect; | 17 class Rect; |
| 18 | 18 |
| 19 // This is the base class for widget elements. As such, it can't be created | 19 // This is the base class for widget elements. As such, it can't be created |
| 20 // directly. | 20 // directly. |
| 21 class Widget_Dev : public Resource { | 21 class Widget_Dev : public Resource { |
| 22 public: | 22 public: |
| 23 // Creates an is_null() Widget object. | 23 // Creates an is_null() Widget object. |
| 24 Widget_Dev() {} | 24 Widget_Dev() {} |
| 25 | 25 |
| 26 explicit Widget_Dev(PP_Resource resource); | 26 explicit Widget_Dev(PP_Resource resource); |
| 27 Widget_Dev(const Widget_Dev& other); | 27 Widget_Dev(const Widget_Dev& other); |
| 28 | 28 |
| 29 Widget_Dev& operator=(const Widget_Dev& other); | 29 Widget_Dev& operator=(const Widget_Dev& other); |
| 30 void swap(Widget_Dev& other); | |
| 31 | 30 |
| 32 // PPB_Widget methods: | 31 // PPB_Widget methods: |
| 33 bool Paint(const Rect& rect, ImageData* image); | 32 bool Paint(const Rect& rect, ImageData* image); |
| 34 bool HandleEvent(const PP_InputEvent& event); | 33 bool HandleEvent(const PP_InputEvent& event); |
| 35 bool GetLocation(Rect* location); | 34 bool GetLocation(Rect* location); |
| 36 void SetLocation(const Rect& location); | 35 void SetLocation(const Rect& location); |
| 37 }; | 36 }; |
| 38 | 37 |
| 39 } // namespace pp | 38 } // namespace pp |
| 40 | 39 |
| 41 #endif // PPAPI_CPP_DEV_WIDGET_DEV_H_ | 40 #endif // PPAPI_CPP_DEV_WIDGET_DEV_H_ |
| OLD | NEW |