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

Side by Side Diff: content/shell/tools/plugin/Tests/PassDifferentNPPStruct.cpp

Issue 629143003: Replace OVERRIDE and FINAL with override and final in content/shell/[a-s]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /* 5 /*
6 * Copyright (C) 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2010 Apple Inc. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 27 matching lines...) Expand all
38 38
39 class PassDifferentNPPStruct : public PluginTest { 39 class PassDifferentNPPStruct : public PluginTest {
40 public: 40 public:
41 PassDifferentNPPStruct(NPP npp, const string& identifier) 41 PassDifferentNPPStruct(NPP npp, const string& identifier)
42 : PluginTest(npp, identifier) 42 : PluginTest(npp, identifier)
43 , m_didReceiveInitialSetWindowCall(false) 43 , m_didReceiveInitialSetWindowCall(false)
44 { 44 {
45 } 45 }
46 46
47 private: 47 private:
48 virtual NPError NPP_SetWindow(NPWindow* window) OVERRIDE 48 virtual NPError NPP_SetWindow(NPWindow* window) override
49 { 49 {
50 if (m_didReceiveInitialSetWindowCall) 50 if (m_didReceiveInitialSetWindowCall)
51 return NPERR_NO_ERROR; 51 return NPERR_NO_ERROR;
52 m_didReceiveInitialSetWindowCall = true; 52 m_didReceiveInitialSetWindowCall = true;
53 53
54 NPP oldNPP = m_npp; 54 NPP oldNPP = m_npp;
55 NPP_t differentNPP = *m_npp; 55 NPP_t differentNPP = *m_npp;
56 m_npp = &differentNPP; 56 m_npp = &differentNPP;
57 57
58 NPBool privateMode; 58 NPBool privateMode;
59 NPError error = NPN_GetValue(NPNVprivateModeBool, &privateMode); 59 NPError error = NPN_GetValue(NPNVprivateModeBool, &privateMode);
60 60
61 m_npp = oldNPP; 61 m_npp = oldNPP;
62 62
63 if (error != NPERR_NO_ERROR) { 63 if (error != NPERR_NO_ERROR) {
64 log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct f ailed with error %d", error); 64 log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct f ailed with error %d", error);
65 notifyDone(); 65 notifyDone();
66 return NPERR_GENERIC_ERROR; 66 return NPERR_GENERIC_ERROR;
67 } 67 }
68 log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct succe eded"); 68 log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct succe eded");
69 notifyDone(); 69 notifyDone();
70 return NPERR_NO_ERROR; 70 return NPERR_NO_ERROR;
71 } 71 }
72 72
73 bool m_didReceiveInitialSetWindowCall; 73 bool m_didReceiveInitialSetWindowCall;
74 }; 74 };
75 75
76 static PluginTest::Register<PassDifferentNPPStruct> getValueNetscapeWindow("pass -different-npp-struct"); 76 static PluginTest::Register<PassDifferentNPPStruct> getValueNetscapeWindow("pass -different-npp-struct");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698