[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 1 | // Copyright (c) 2011 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. |
| 4 | |
[email protected] | 9a57839 | 2011-12-07 18:59:27 | [diff] [blame] | 5 | #ifndef PPAPI_SHARED_IMPL_PPB_INSTANCE_SHARED_H_ |
| 6 | #define PPAPI_SHARED_IMPL_PPB_INSTANCE_SHARED_H_ |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 7 | |
[email protected] | a9b16dd | 2012-01-31 05:00:26 | [diff] [blame] | 8 | #include "base/compiler_specific.h" |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 9 | #include "ppapi/c/pp_stdint.h" |
[email protected] | f0a04c4 | 2011-08-26 22:43:20 | [diff] [blame] | 10 | #include "ppapi/shared_impl/ppapi_shared_export.h" |
[email protected] | a9b16dd | 2012-01-31 05:00:26 | [diff] [blame] | 11 | #include "ppapi/thunk/ppb_instance_api.h" |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 12 | |
| 13 | namespace ppapi { |
| 14 | |
Nico Weber | 43ddd7a3 | 2017-08-15 19:19:27 | [diff] [blame] | 15 | class PPAPI_SHARED_EXPORT PPB_Instance_Shared : public thunk::PPB_Instance_API { |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 16 | public: |
nick | e478443 | 2015-04-23 14:01:48 | [diff] [blame] | 17 | ~PPB_Instance_Shared() override; |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 18 | |
[email protected] | a9b16dd | 2012-01-31 05:00:26 | [diff] [blame] | 19 | // Implementation of some shared PPB_Instance_FunctionAPI functions. |
nick | e478443 | 2015-04-23 14:01:48 | [diff] [blame] | 20 | void Log(PP_Instance instance, PP_LogLevel log_level, PP_Var value) override; |
| 21 | void LogWithSource(PP_Instance instance, |
| 22 | PP_LogLevel log_level, |
| 23 | PP_Var source, |
| 24 | PP_Var value) override; |
[email protected] | a9b16dd | 2012-01-31 05:00:26 | [diff] [blame] | 25 | |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 26 | // Error checks the given resquest to Request[Filtering]InputEvents. Returns |
| 27 | // PP_OK if the given classes are all valid, PP_ERROR_NOTSUPPORTED if not. |
| 28 | int32_t ValidateRequestInputEvents(bool is_filtering, uint32_t event_classes); |
[email protected] | 33ec5056 | 2012-04-08 20:28:43 | [diff] [blame] | 29 | |
| 30 | bool ValidateSetCursorParams(PP_MouseCursor_Type type, |
[email protected] | faf06b03 | 2012-04-11 22:41:50 | [diff] [blame] | 31 | PP_Resource image, |
| 32 | const PP_Point* hot_spot); |
[email protected] | 877c69e | 2012-04-12 18:59:15 | [diff] [blame] | 33 | |
| 34 | // The length of text to request as a surrounding context of selection. |
| 35 | // For now, the value is copied from the one with render_view_impl.cc. |
| 36 | // TODO(kinaba) implement a way to dynamically sync the requirement. |
| 37 | static const int kExtraCharsForTextInput; |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | } // namespace ppapi |
| 41 | |
[email protected] | 9a57839 | 2011-12-07 18:59:27 | [diff] [blame] | 42 | #endif // PPAPI_SHARED_IMPL_PPB_INSTANCE_SHARED_H_ |