OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 { | 42 { |
43 } | 43 } |
44 | 44 |
45 NPError LogNPPSetWindow::NPP_SetWindow(NPWindow* window) | 45 NPError LogNPPSetWindow::NPP_SetWindow(NPWindow* window) |
46 { | 46 { |
47 char message[1024]; | 47 char message[1024]; |
48 snprintf(message, 1024, "NPP_SetWindow: %s window, Rect {%i, %i, %i, %i}, Cl
ip Rect {%i, %i, %i, %i}, Type %i", | 48 snprintf(message, 1024, "NPP_SetWindow: %s window, Rect {%i, %i, %i, %i}, Cl
ip Rect {%i, %i, %i, %i}, Type %i", |
49 window->window ? "non-NULL" : "NULL", window->x, window->y, window->widt
h, window->height, | 49 window->window ? "non-NULL" : "NULL", window->x, window->y, window->widt
h, window->height, |
50 window->clipRect.left, window->clipRect.top, window->clipRect.right, win
dow->clipRect.bottom, | 50 window->clipRect.left, window->clipRect.top, window->clipRect.right, win
dow->clipRect.bottom, |
51 window->type); | 51 window->type); |
52 | 52 |
53 char script[1536]; | 53 char script[1536]; |
54 snprintf(script, 1536, "window.setTimeout('windowWasSet(\"%s\");', 0);", mes
sage); | 54 snprintf(script, 1536, "window.setTimeout('windowWasSet(\"%s\");', 0);", mes
sage); |
55 | 55 |
56 executeScript(script); | 56 executeScript(script); |
57 | 57 |
58 return NPERR_NO_ERROR; | 58 return NPERR_NO_ERROR; |
59 } | 59 } |
60 | 60 |
61 static PluginTest::Register<LogNPPSetWindow> registrar("log-npp-set-window"); | 61 static PluginTest::Register<LogNPPSetWindow> registrar("log-npp-set-window"); |
OLD | NEW |