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

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

Issue 7032: Patch by Thatcher Ulrich <tulrich@google.com>.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | Annotate | Revision Log
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | chrome/renderer/render_view.cc » ('j') | 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 "chrome/plugin/webplugin_proxy.h" 5 #include "chrome/plugin/webplugin_proxy.h"
6 6
7 #include "base/gfx/bitmap_header.h" 7 #include "base/gfx/gdi_util.h"
8 #include "base/gfx/platform_device_win.h" 8 #include "base/gfx/platform_device_win.h"
9 #include "base/scoped_handle.h" 9 #include "base/scoped_handle.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
11 #include "base/singleton.h" 11 #include "base/singleton.h"
12 #include "chrome/common/gfx/chrome_canvas.h" 12 #include "chrome/common/gfx/chrome_canvas.h"
13 #include "chrome/common/plugin_messages.h" 13 #include "chrome/common/plugin_messages.h"
14 #include "chrome/common/win_util.h" 14 #include "chrome/common/win_util.h"
15 #include "chrome/plugin/plugin_channel.h" 15 #include "chrome/plugin/plugin_channel.h"
16 #include "chrome/plugin/webplugin_delegate_stub.h" 16 #include "chrome/plugin/webplugin_delegate_stub.h"
17 #include "chrome/plugin/npobject_proxy.h" 17 #include "chrome/plugin/npobject_proxy.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 271
272 // Before we send the invalidate, paint so that renderer uses the updated 272 // Before we send the invalidate, paint so that renderer uses the updated
273 // bitmap. 273 // bitmap.
274 delegate_->Paint(windowless_hdc_, offset_rect); 274 delegate_->Paint(windowless_hdc_, offset_rect);
275 } 275 }
276 276
277 void WebPluginProxy::UpdateGeometry( 277 void WebPluginProxy::UpdateGeometry(
278 const gfx::Rect& window_rect, 278 const gfx::Rect& window_rect,
279 const gfx::Rect& clip_rect, 279 const gfx::Rect& clip_rect,
280 const std::vector<gfx::Rect>& cutout_rects,
280 bool visible, 281 bool visible,
281 const SharedMemoryHandle& windowless_buffer, 282 const SharedMemoryHandle& windowless_buffer,
282 const SharedMemoryHandle& background_buffer) { 283 const SharedMemoryHandle& background_buffer) {
283 gfx::Rect old = delegate_->rect(); 284 gfx::Rect old = delegate_->rect();
284 bool moved = delegate_->rect().x() != window_rect.x() || 285 bool moved = delegate_->rect().x() != window_rect.x() ||
285 delegate_->rect().y() != window_rect.y(); 286 delegate_->rect().y() != window_rect.y();
286 delegate_->UpdateGeometry(window_rect, clip_rect, visible); 287 delegate_->UpdateGeometry(window_rect, clip_rect, cutout_rects, visible);
287 if (windowless_buffer) { 288 if (windowless_buffer) {
288 // The plugin's rect changed, so now we have a new buffer to draw into. 289 // The plugin's rect changed, so now we have a new buffer to draw into.
289 SetWindowlessBuffer(windowless_buffer, background_buffer); 290 SetWindowlessBuffer(windowless_buffer, background_buffer);
290 } else if (moved) { 291 } else if (moved) {
291 // The plugin moved, so update our world transform. 292 // The plugin moved, so update our world transform.
292 UpdateTransform(); 293 UpdateTransform();
293 } 294 }
294 } 295 }
295 296
296 void WebPluginProxy::SetWindowlessBuffer( 297 void WebPluginProxy::SetWindowlessBuffer(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 void WebPluginProxy::InitiateHTTPRangeRequest(const char* url, 369 void WebPluginProxy::InitiateHTTPRangeRequest(const char* url,
369 const char* range_info, 370 const char* range_info,
370 void* existing_stream, 371 void* existing_stream,
371 bool notify_needed, 372 bool notify_needed,
372 HANDLE notify_data) { 373 HANDLE notify_data) {
373 374
374 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, 375 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url,
375 range_info, existing_stream, 376 range_info, existing_stream,
376 notify_needed, notify_data)); 377 notify_needed, notify_data));
377 } 378 }
OLDNEW
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698