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_SELECTION_DEV_H_
6 #define PPAPI_CPP_DEV_SELECTION_DEV_H_
8 #include "ppapi/c/dev/ppp_selection_dev.h"
9 #include "ppapi/cpp/instance_handle.h"
15 // This class allows you to associate the PPP_Selection_Dev C-based interface
16 // with an object. It registers as the global handler for handling the
17 // PPP_Selection_Dev interface that the browser calls.
19 // You would typically use this either via inheritance on your instance:
20 // class MyInstance : public pp::Instance, public pp::Selection_Dev {
21 // class MyInstance() : pp::Selection_Dev(this) {
27 // class MySelection : public pp::Selection_Dev {
31 // class MyInstance : public pp::Instance {
32 // MyInstance() : selection_(this) {
35 // MySelection selection_;
39 explicit Selection_Dev(Instance
* instance
);
40 virtual ~Selection_Dev();
42 // PPP_Selection_Dev functions exposed as virtual functions for you to
44 virtual Var
GetSelectedText(bool html
) = 0;
47 InstanceHandle associated_instance_
;
52 #endif // PPAPI_CPP_DEV_SELECTION_DEV_H_