Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp

Issue 20300002: Fix trailing whitespace in .cpp, .h, and .idl files (ex. Source/core) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 20 matching lines...) Expand all
31 class PluginScriptableNPObjectInvokeDefault : public PluginTest { 31 class PluginScriptableNPObjectInvokeDefault : public PluginTest {
32 public: 32 public:
33 PluginScriptableNPObjectInvokeDefault(NPP npp, const string& identifier) 33 PluginScriptableNPObjectInvokeDefault(NPP npp, const string& identifier)
34 : PluginTest(npp, identifier) 34 : PluginTest(npp, identifier)
35 { 35 {
36 } 36 }
37 37
38 private: 38 private:
39 struct NPObjectWithoutInvokeDefault : Object<NPObjectWithoutInvokeDefault> { }; 39 struct NPObjectWithoutInvokeDefault : Object<NPObjectWithoutInvokeDefault> { };
40 40
41 struct NPObjectWithInvokeDefault : Object<NPObjectWithInvokeDefault> { 41 struct NPObjectWithInvokeDefault : Object<NPObjectWithInvokeDefault> {
42 public: 42 public:
43 bool invokeDefault(const NPVariant*, uint32_t, NPVariant* result) 43 bool invokeDefault(const NPVariant*, uint32_t, NPVariant* result)
44 { 44 {
45 INT32_TO_NPVARIANT(1, *result); 45 INT32_TO_NPVARIANT(1, *result);
46 return true; 46 return true;
47 } 47 }
48 }; 48 };
49 49
50 virtual NPError NPP_GetValue(NPPVariable variable, void *value) 50 virtual NPError NPP_GetValue(NPPVariable variable, void *value)
51 { 51 {
52 if (variable != NPPVpluginScriptableNPObject) 52 if (variable != NPPVpluginScriptableNPObject)
53 return NPERR_GENERIC_ERROR; 53 return NPERR_GENERIC_ERROR;
54 54
55 NPObject* object; 55 NPObject* object;
56 if (identifier() == "plugin-scriptable-npobject-invoke-default") 56 if (identifier() == "plugin-scriptable-npobject-invoke-default")
57 object = NPObjectWithInvokeDefault::create(this); 57 object = NPObjectWithInvokeDefault::create(this);
58 else 58 else
59 object = NPObjectWithoutInvokeDefault::create(this); 59 object = NPObjectWithoutInvokeDefault::create(this);
60 60
61 *(NPObject**)value = object; 61 *(NPObject**)value = object;
62 62
63 return NPERR_NO_ERROR; 63 return NPERR_NO_ERROR;
64 } 64 }
65 }; 65 };
66 66
67 static PluginTest::Register<PluginScriptableNPObjectInvokeDefault> pluginScripta bleNPObjectInvokeDefault("plugin-scriptable-npobject-invoke-default"); 67 static PluginTest::Register<PluginScriptableNPObjectInvokeDefault> pluginScripta bleNPObjectInvokeDefault("plugin-scriptable-npobject-invoke-default");
68 static PluginTest::Register<PluginScriptableNPObjectInvokeDefault> pluginScripta bleNPObjectNoInvokeDefault("plugin-scriptable-npobject-no-invoke-default"); 68 static PluginTest::Register<PluginScriptableNPObjectInvokeDefault> pluginScripta bleNPObjectNoInvokeDefault("plugin-scriptable-npobject-no-invoke-default");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698