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

Side by Side Diff: Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.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, 4 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 21 matching lines...) Expand all
32 NPRuntimeObjectFromDestroyedPlugin(NPP npp, const string& identifier) 32 NPRuntimeObjectFromDestroyedPlugin(NPP npp, const string& identifier)
33 : PluginTest(npp, identifier) 33 : PluginTest(npp, identifier)
34 { 34 {
35 } 35 }
36 36
37 private: 37 private:
38 // This is the test object. 38 // This is the test object.
39 class TestObject : public Object<TestObject> { }; 39 class TestObject : public Object<TestObject> { };
40 40
41 // This is the scriptable object. It has a single "testObject" property and an "evaluate" function. 41 // This is the scriptable object. It has a single "testObject" property and an "evaluate" function.
42 class ScriptableObject : public Object<ScriptableObject> { 42 class ScriptableObject : public Object<ScriptableObject> {
43 public: 43 public:
44 bool hasMethod(NPIdentifier methodName) 44 bool hasMethod(NPIdentifier methodName)
45 { 45 {
46 return identifierIs(methodName, "evaluate"); 46 return identifierIs(methodName, "evaluate");
47 } 47 }
48 48
49 bool invoke(NPIdentifier methodName, const NPVariant* args, uint32_t arg Count, NPVariant* result) 49 bool invoke(NPIdentifier methodName, const NPVariant* args, uint32_t arg Count, NPVariant* result)
50 { 50 {
51 if (!identifierIs(methodName, "evaluate")) 51 if (!identifierIs(methodName, "evaluate"))
52 return false; 52 return false;
(...skipping 17 matching lines...) Expand all
70 NPObject* testObject = TestObject::create(pluginTest()); 70 NPObject* testObject = TestObject::create(pluginTest());
71 OBJECT_TO_NPVARIANT(testObject, *result); 71 OBJECT_TO_NPVARIANT(testObject, *result);
72 return true; 72 return true;
73 } 73 }
74 }; 74 };
75 75
76 virtual NPError NPP_GetValue(NPPVariable variable, void *value) 76 virtual NPError NPP_GetValue(NPPVariable variable, void *value)
77 { 77 {
78 if (variable != NPPVpluginScriptableNPObject) 78 if (variable != NPPVpluginScriptableNPObject)
79 return NPERR_GENERIC_ERROR; 79 return NPERR_GENERIC_ERROR;
80 80
81 *(NPObject**)value = ScriptableObject::create(this); 81 *(NPObject**)value = ScriptableObject::create(this);
82 82
83 return NPERR_NO_ERROR; 83 return NPERR_NO_ERROR;
84 } 84 }
85 }; 85 };
86 86
87 static PluginTest::Register<NPRuntimeObjectFromDestroyedPlugin> npRuntimeObjectF romDestroyedPlugin("npruntime-object-from-destroyed-plugin"); 87 static PluginTest::Register<NPRuntimeObjectFromDestroyedPlugin> npRuntimeObjectF romDestroyedPlugin("npruntime-object-from-destroyed-plugin");
88 88
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698