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

Side by Side Diff: webkit/glue/plugins/plugin_host.cc

Issue 431: Fixes the following bugs reported with the Silverlight plugin:-... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "webkit/glue/plugins/plugin_host.h" 5 #include "webkit/glue/plugins/plugin_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "webkit/default_plugin/default_plugin_shared.h" 10 #include "webkit/default_plugin/default_plugin_shared.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // this method, the plug-in recieves a paint message asynchronously. 166 // this method, the plug-in recieves a paint message asynchronously.
167 167
168 // The browser redraws invalid areas of the document and any windowless 168 // The browser redraws invalid areas of the document and any windowless
169 // plug-ins at regularly timed intervals. To force a paint message, the 169 // plug-ins at regularly timed intervals. To force a paint message, the
170 // plug-in can call NPN_ForceRedraw after calling this method. 170 // plug-in can call NPN_ForceRedraw after calling this method.
171 171
172 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); 172 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
173 DCHECK(plugin.get() != NULL); 173 DCHECK(plugin.get() != NULL);
174 174
175 if (plugin.get() && plugin->webplugin()) { 175 if (plugin.get() && plugin->webplugin()) {
176 if (!plugin->windowless()) {
177 RECT rect = {0};
178 rect.left = invalidRect->left;
179 rect.right = invalidRect->right;
180 rect.top = invalidRect->top;
181 rect.bottom = invalidRect->bottom;
182 ::InvalidateRect(plugin->window_handle(), &rect, FALSE);
183 return;
184 }
185
176 if (plugin->throttle_invalidate()) { 186 if (plugin->throttle_invalidate()) {
177 // We need to track plugin invalidates on a per instance basis. 187 // We need to track plugin invalidates on a per instance basis.
178 ThrottledInvalidates plugin_instance_invalidates; 188 ThrottledInvalidates plugin_instance_invalidates;
179 InstanceThrottledInvalidatesMap::iterator invalidate_index = 189 InstanceThrottledInvalidatesMap::iterator invalidate_index =
180 instance_throttled_invalidates_.find(id); 190 instance_throttled_invalidates_.find(id);
181 if (invalidate_index != instance_throttled_invalidates_.end()) { 191 if (invalidate_index != instance_throttled_invalidates_.end()) {
182 plugin_instance_invalidates = (*invalidate_index).second; 192 plugin_instance_invalidates = (*invalidate_index).second;
183 } 193 }
184 194
185 bool throttle_active = 195 bool throttle_active =
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 NPObject* obj, 854 NPObject* obj,
845 const NPVariant *args, 855 const NPVariant *args,
846 uint32_t argCount, 856 uint32_t argCount,
847 NPVariant *result) { 857 NPVariant *result) {
848 NOTREACHED(); 858 NOTREACHED();
849 return false; 859 return false;
850 } 860 }
851 861
852 } // extern "C" 862 } // extern "C"
853 863
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698