Chromium Code Reviews| 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_CLIENT_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ |
| 6 #define PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ | 6 #define PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/pp_stdint.h" | 8 #include "ppapi/c/pp_stdint.h" |
| 9 #include "ppapi/cpp/instance_handle.h" | |
| 9 | 10 |
| 10 namespace pp { | 11 namespace pp { |
| 11 | 12 |
| 12 class Instance; | |
| 13 class Rect; | 13 class Rect; |
| 14 class Scrollbar_Dev; | 14 class Scrollbar_Dev; |
| 15 class Widget_Dev; | 15 class Widget_Dev; |
| 16 | 16 |
| 17 // This class provides a C++ interface for callbacks related to widgets. You | 17 // This class provides a C++ interface for callbacks related to widgets. You |
| 18 // would normally use multiple inheritance to derive from this class in your | 18 // would normally use multiple inheritance to derive from this class in your |
| 19 // instance. | 19 // instance. |
| 20 class WidgetClient_Dev { | 20 class WidgetClient_Dev { |
| 21 public: | 21 public: |
| 22 WidgetClient_Dev(Instance* instance); | 22 WidgetClient_Dev(const InstanceHandle& instance); |
|
dmichael (off chromium)
2012/02/22 21:38:44
explicit
| |
| 23 virtual ~WidgetClient_Dev(); | 23 virtual ~WidgetClient_Dev(); |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Notification that the given widget should be repainted. This is the | 26 * Notification that the given widget should be repainted. This is the |
| 27 * implementation for PPP_Widget_Dev. | 27 * implementation for PPP_Widget_Dev. |
| 28 */ | 28 */ |
| 29 virtual void InvalidateWidget(Widget_Dev widget, const Rect& dirty_rect) = 0; | 29 virtual void InvalidateWidget(Widget_Dev widget, const Rect& dirty_rect) = 0; |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * Notification that the given scrollbar should change value. This is the | 32 * Notification that the given scrollbar should change value. This is the |
| 33 * implementation for PPP_Scrollbar_Dev. | 33 * implementation for PPP_Scrollbar_Dev. |
| 34 */ | 34 */ |
| 35 virtual void ScrollbarValueChanged(Scrollbar_Dev scrollbar, | 35 virtual void ScrollbarValueChanged(Scrollbar_Dev scrollbar, |
| 36 uint32_t value) = 0; | 36 uint32_t value) = 0; |
| 37 | 37 |
| 38 /** | 38 /** |
| 39 * Notification that the given scrollbar's overlay type has changed. This is | 39 * Notification that the given scrollbar's overlay type has changed. This is |
| 40 * the implementation for PPP_Scrollbar_Dev. | 40 * the implementation for PPP_Scrollbar_Dev. |
| 41 */ | 41 */ |
| 42 virtual void ScrollbarOverlayChanged(Scrollbar_Dev scrollbar, | 42 virtual void ScrollbarOverlayChanged(Scrollbar_Dev scrollbar, |
| 43 bool type) = 0; | 43 bool type) = 0; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 Instance* associated_instance_; | 46 InstanceHandle associated_instance_; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace pp | 49 } // namespace pp |
| 50 | 50 |
| 51 #endif // PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ | 51 #endif // PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_ |
| OLD | NEW |