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

Side by Side Diff: chrome/plugin/webplugin_delegate_stub.cc

Issue 18082: Improve scrolling performance when there are many windowed plugins in a page.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Call DestroyWindow on the right thread & ensure NPP_SetWindow is called right away Created 11 years, 11 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 // 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 "chrome/plugin/webplugin_delegate_stub.h" 5 #include "chrome/plugin/webplugin_delegate_stub.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "chrome/common/chrome_switches.h" 9 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/gfx/emf.h" 10 #include "chrome/common/gfx/emf.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 CreateSharedBuffer(size, &shared_buf, &params->shared_memory); 232 CreateSharedBuffer(size, &shared_buf, &params->shared_memory);
233 233
234 // Retrieve a copy of the data. 234 // Retrieve a copy of the data.
235 bool success = emf.GetData(shared_buf.memory(), size); 235 bool success = emf.GetData(shared_buf.memory(), size);
236 DCHECK(success); 236 DCHECK(success);
237 } 237 }
238 238
239 void WebPluginDelegateStub::OnUpdateGeometry( 239 void WebPluginDelegateStub::OnUpdateGeometry(
240 const gfx::Rect& window_rect, 240 const gfx::Rect& window_rect,
241 const gfx::Rect& clip_rect, 241 const gfx::Rect& clip_rect,
242 const std::vector<gfx::Rect>& cutout_rects,
243 bool visible,
244 const base::SharedMemoryHandle& windowless_buffer, 242 const base::SharedMemoryHandle& windowless_buffer,
245 const base::SharedMemoryHandle& background_buffer) { 243 const base::SharedMemoryHandle& background_buffer) {
246 webplugin_->UpdateGeometry( 244 webplugin_->UpdateGeometry(
247 window_rect, clip_rect, cutout_rects, visible, windowless_buffer, 245 window_rect, clip_rect, windowless_buffer, background_buffer);
248 background_buffer);
249 } 246 }
250 247
251 void WebPluginDelegateStub::OnGetPluginScriptableObject(int* route_id, 248 void WebPluginDelegateStub::OnGetPluginScriptableObject(int* route_id,
252 void** npobject_ptr) { 249 void** npobject_ptr) {
253 NPObject* object = delegate_->GetPluginScriptableObject(); 250 NPObject* object = delegate_->GetPluginScriptableObject();
254 if (!object) { 251 if (!object) {
255 *route_id = MSG_ROUTING_NONE; 252 *route_id = MSG_ROUTING_NONE;
256 return; 253 return;
257 } 254 }
258 255
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 params.stream); 333 params.stream);
337 webplugin_->OnResourceCreated(params.resource_id, resource_client); 334 webplugin_->OnResourceCreated(params.resource_id, resource_client);
338 } 335 }
339 336
340 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, 337 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url,
341 bool notify_needed, 338 bool notify_needed,
342 HANDLE notify_data) { 339 HANDLE notify_data) {
343 delegate_->URLRequestRouted(url, notify_needed, notify_data); 340 delegate_->URLRequestRouted(url, notify_needed, notify_data);
344 } 341 }
345 342
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698