| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_FRAME_NP_BROWSER_FUNCTIONS_H_ | 5 #ifndef CHROME_FRAME_NP_BROWSER_FUNCTIONS_H_ |
| 6 #define CHROME_FRAME_NP_BROWSER_FUNCTIONS_H_ | 6 #define CHROME_FRAME_NP_BROWSER_FUNCTIONS_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "third_party/npapi/bindings/npapi.h" | 9 #include "third_party/npapi/bindings/npapi.h" |
| 10 #include "third_party/npapi/bindings/nphostapi.h" | 10 #include "third_party/npapi/bindings/nphostapi.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 const char* host, int32 port, const char* scheme, | 133 const char* host, int32 port, const char* scheme, |
| 134 const char *realm, char** username, uint32* ulen, | 134 const char *realm, char** username, uint32* ulen, |
| 135 char** password, uint32* plen); | 135 char** password, uint32* plen); |
| 136 uint32 ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, | 136 uint32 ScheduleTimer(NPP instance, uint32 interval, NPBool repeat, |
| 137 void (*timerFunc)(NPP npp, uint32 timerID)); | 137 void (*timerFunc)(NPP npp, uint32 timerID)); |
| 138 void UnscheduleTimer(NPP instance, uint32 timerID); | 138 void UnscheduleTimer(NPP instance, uint32 timerID); |
| 139 NPError PopUpContextMenu(NPP instance, NPMenu* menu); | 139 NPError PopUpContextMenu(NPP instance, NPMenu* menu); |
| 140 NPBool ConvertPoint(NPP instance, double sourceX, double sourceY, | 140 NPBool ConvertPoint(NPP instance, double sourceX, double sourceY, |
| 141 NPCoordinateSpace sourceSpace, double *destX, | 141 NPCoordinateSpace sourceSpace, double *destX, |
| 142 double *destY, NPCoordinateSpace destSpace); | 142 double *destY, NPCoordinateSpace destSpace); |
| 143 void URLRedirectResponse(NPP instance, void* notify_data, NPBool allow); |
| 143 | 144 |
| 144 // Helper routine that wraps UTF8FromIdentifier to convert a string identifier | 145 // Helper routine that wraps UTF8FromIdentifier to convert a string identifier |
| 145 // to an STL string. It's not super efficient since it could possibly do two | 146 // to an STL string. It's not super efficient since it could possibly do two |
| 146 // heap allocations (STL string has a stack based buffer for smaller strings). | 147 // heap allocations (STL string has a stack based buffer for smaller strings). |
| 147 // For debugging purposes it is useful. | 148 // For debugging purposes it is useful. |
| 148 std::string StringFromIdentifier(NPIdentifier identifier); | 149 std::string StringFromIdentifier(NPIdentifier identifier); |
| 149 | 150 |
| 150 } // namespace npapi | 151 } // namespace npapi |
| 151 | 152 |
| 152 // Simple helper class for freeing NPVariants at the end of a scope. | 153 // Simple helper class for freeing NPVariants at the end of a scope. |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 NpoType* npo_; | 270 NpoType* npo_; |
| 270 DISALLOW_COPY_AND_ASSIGN(ScopedNpObject); | 271 DISALLOW_COPY_AND_ASSIGN(ScopedNpObject); |
| 271 }; | 272 }; |
| 272 | 273 |
| 273 // Allocates a new NPUTF8 string and assigns it to the variant. | 274 // Allocates a new NPUTF8 string and assigns it to the variant. |
| 274 // If memory allocation fails, the variant type will be set to NULL. | 275 // If memory allocation fails, the variant type will be set to NULL. |
| 275 // The memory allocation is done via the npapi browser functions. | 276 // The memory allocation is done via the npapi browser functions. |
| 276 void AllocateStringVariant(const std::string& str, NPVariant* var); | 277 void AllocateStringVariant(const std::string& str, NPVariant* var); |
| 277 | 278 |
| 278 #endif // CHROME_FRAME_NP_BROWSER_FUNCTIONS_H_ | 279 #endif // CHROME_FRAME_NP_BROWSER_FUNCTIONS_H_ |
| OLD | NEW |