| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/child/npapi/plugin_host.h" | 5 #include "content/child/npapi/plugin_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 DVLOG(1) << "NPN_Status is not implemented yet."; | 616 DVLOG(1) << "NPN_Status is not implemented yet."; |
| 617 } | 617 } |
| 618 | 618 |
| 619 void NPN_InvalidateRect(NPP id, NPRect *invalidRect) { | 619 void NPN_InvalidateRect(NPP id, NPRect *invalidRect) { |
| 620 // Invalidates specified drawing area prior to repainting or refreshing a | 620 // Invalidates specified drawing area prior to repainting or refreshing a |
| 621 // windowless plugin | 621 // windowless plugin |
| 622 | 622 |
| 623 // Before a windowless plugin can refresh part of its drawing area, it must | 623 // Before a windowless plugin can refresh part of its drawing area, it must |
| 624 // first invalidate it. This function causes the NPP_HandleEvent method to | 624 // first invalidate it. This function causes the NPP_HandleEvent method to |
| 625 // pass an update event or a paint message to the plug-in. After calling | 625 // pass an update event or a paint message to the plug-in. After calling |
| 626 // this method, the plug-in recieves a paint message asynchronously. | 626 // this method, the plug-in receives a paint message asynchronously. |
| 627 | 627 |
| 628 // The browser redraws invalid areas of the document and any windowless | 628 // The browser redraws invalid areas of the document and any windowless |
| 629 // plug-ins at regularly timed intervals. To force a paint message, the | 629 // plug-ins at regularly timed intervals. To force a paint message, the |
| 630 // plug-in can call NPN_ForceRedraw after calling this method. | 630 // plug-in can call NPN_ForceRedraw after calling this method. |
| 631 | 631 |
| 632 scoped_refptr<PluginInstance> plugin(FindInstance(id)); | 632 scoped_refptr<PluginInstance> plugin(FindInstance(id)); |
| 633 if (plugin.get() && plugin->webplugin()) { | 633 if (plugin.get() && plugin->webplugin()) { |
| 634 if (invalidRect) { | 634 if (invalidRect) { |
| 635 #if defined(OS_WIN) | 635 #if defined(OS_WIN) |
| 636 if (!plugin->windowless()) { | 636 if (!plugin->windowless()) { |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) { | 1103 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) { |
| 1104 scoped_refptr<PluginInstance> plugin(FindInstance(instance)); | 1104 scoped_refptr<PluginInstance> plugin(FindInstance(instance)); |
| 1105 if (plugin.get()) { | 1105 if (plugin.get()) { |
| 1106 plugin->URLRedirectResponse(!!allow, notify_data); | 1106 plugin->URLRedirectResponse(!!allow, notify_data); |
| 1107 } | 1107 } |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 } // extern "C" | 1110 } // extern "C" |
| OLD | NEW |