Add/resurrect support for bundles of WebStore items.
[chromium-blink-merge.git] / ppapi / cpp / dev / widget_client_dev.h
blobc638cef66ae8b26cb38d9a7f553694529b48e09e
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
3 // found in the LICENSE file.
5 #ifndef PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_
6 #define PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_
8 #include "ppapi/c/pp_stdint.h"
9 #include "ppapi/cpp/instance_handle.h"
11 namespace pp {
13 class Instance;
14 class Rect;
15 class Scrollbar_Dev;
16 class Widget_Dev;
18 // This class provides a C++ interface for callbacks related to widgets. You
19 // would normally use multiple inheritance to derive from this class in your
20 // instance.
21 class WidgetClient_Dev {
22 public:
23 explicit WidgetClient_Dev(Instance* instance);
24 virtual ~WidgetClient_Dev();
26 /**
27 * Notification that the given widget should be repainted. This is the
28 * implementation for PPP_Widget_Dev.
30 virtual void InvalidateWidget(Widget_Dev widget, const Rect& dirty_rect) = 0;
32 /**
33 * Notification that the given scrollbar should change value. This is the
34 * implementation for PPP_Scrollbar_Dev.
36 virtual void ScrollbarValueChanged(Scrollbar_Dev scrollbar,
37 uint32_t value) = 0;
39 /**
40 * Notification that the given scrollbar's overlay type has changed. This is
41 * the implementation for PPP_Scrollbar_Dev.
43 virtual void ScrollbarOverlayChanged(Scrollbar_Dev scrollbar,
44 bool type) = 0;
46 private:
47 InstanceHandle associated_instance_;
50 } // namespace pp
52 #endif // PPAPI_CPP_DEV_WIDGET_CLIENT_DEV_H_