~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/plugins/PluginDebug.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include "Logging.h"
30
30
#include "npruntime_internal.h"
 
31
#include "CString.h"
 
32
 
 
33
#define LOG_NPERROR(err) if (err != NPERR_NO_ERROR) LOG_VERBOSE(Plugins, "%s\n", prettyNameForNPError(err))
 
34
#define LOG_PLUGIN_NET_ERROR() LOG_VERBOSE(Plugins, "Stream failed due to problems with network, disk I/O, lack of memory, or other problems.\n")
31
35
 
32
36
#if !LOG_DISABLED
33
37
 
34
 
static const char* const errorStrings[] = {
35
 
    "No errors occurred.", /* NPERR_NO_ERROR */
36
 
    "Error with no specific error code occurred.", /* NPERR_GENERIC_ERROR */
37
 
    "Invalid instance passed to the plug-in.", /* NPERR_INVALID_INSTANCE_ERROR */
38
 
    "Function table invalid.", /* NPERR_INVALID_FUNCTABLE_ERROR */
39
 
    "Loading of plug-in failed.", /* NPERR_MODULE_LOAD_FAILED_ERROR */
40
 
    "Memory allocation failed.", /* NPERR_OUT_OF_MEMORY_ERROR */
41
 
    "Plug-in missing or invalid.", /* NPERR_INVALID_PLUGIN_ERROR */
42
 
    "Plug-in directory missing or invalid.", /* NPERR_INVALID_PLUGIN_DIR_ERROR */
43
 
    "Versions of plug-in and Communicator do not match.", /* NPERR_INCOMPATIBLE_VERSION_ERROR */
44
 
    "Parameter missing or invalid.", /* NPERR_INVALID_PARAM */
45
 
    "URL missing or invalid.", /* NPERR_INVALID_URL */
46
 
    "File missing or invalid.", /* NPERR_FILE_NOT_FOUND */
47
 
    "Stream contains no data.", /* NPERR_NO_DATA */
48
 
    "Seekable stream expected.", /* NPERR_STREAM_NOT_SEEKABLE */
49
 
    "Unknown error code"
50
 
};
51
 
 
52
 
#endif
53
 
 
54
 
#define LOG_NPERROR(err) if (err != NPERR_NO_ERROR) LOG_VERBOSE(Plugin, "%s\n", errorStrings[err])
55
 
#define LOG_PLUGIN_NET_ERROR() LOG_VERBOSE(Plugin, "Stream failed due to problems with network, disk I/O, lack of memory, or other problems.\n")
56
 
 
57
 
#endif
 
38
namespace WebCore {
 
39
 
 
40
const char* prettyNameForNPError(NPError error);
 
41
 
 
42
CString prettyNameForNPNVariable(NPNVariable variable);
 
43
CString prettyNameForNPPVariable(NPPVariable variable, void* value);
 
44
 
 
45
#ifdef XP_MACOSX
 
46
const char* prettyNameForDrawingModel(NPDrawingModel drawingModel);
 
47
const char* prettyNameForEventModel(NPEventModel eventModel);
 
48
#endif
 
49
 
 
50
} // namespace WebCore
 
51
 
 
52
#endif // !LOG_DISABLED
 
53
 
 
54
#endif // PluginDebug_h