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

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

Issue 1612: Implement "iframe shim" behavior for windowed plugins.... (Closed) Base URL: http://src.chromium.org/svn/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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 268 }
269 269
270 // Before we send the invalidate, paint so that renderer uses the updated 270 // Before we send the invalidate, paint so that renderer uses the updated
271 // bitmap. 271 // bitmap.
272 delegate_->Paint(windowless_hdc_, offset_rect); 272 delegate_->Paint(windowless_hdc_, offset_rect);
273 } 273 }
274 274
275 void WebPluginProxy::UpdateGeometry( 275 void WebPluginProxy::UpdateGeometry(
276 const gfx::Rect& window_rect, 276 const gfx::Rect& window_rect,
277 const gfx::Rect& clip_rect, 277 const gfx::Rect& clip_rect,
278 const std::vector<gfx::Rect>& cutout_rects,
278 bool visible, 279 bool visible,
279 const SharedMemoryHandle& windowless_buffer, 280 const SharedMemoryHandle& windowless_buffer,
280 const SharedMemoryHandle& background_buffer) { 281 const SharedMemoryHandle& background_buffer) {
281 gfx::Rect old = delegate_->rect(); 282 gfx::Rect old = delegate_->rect();
282 bool moved = delegate_->rect().x() != window_rect.x() || 283 bool moved = delegate_->rect().x() != window_rect.x() ||
283 delegate_->rect().y() != window_rect.y(); 284 delegate_->rect().y() != window_rect.y();
284 delegate_->UpdateGeometry(window_rect, clip_rect, visible); 285 delegate_->UpdateGeometry(window_rect, clip_rect, cutout_rects, visible);
285 if (windowless_buffer) { 286 if (windowless_buffer) {
286 // The plugin's rect changed, so now we have a new buffer to draw into. 287 // The plugin's rect changed, so now we have a new buffer to draw into.
287 SetWindowlessBuffer(windowless_buffer, background_buffer); 288 SetWindowlessBuffer(windowless_buffer, background_buffer);
288 } else if (moved) { 289 } else if (moved) {
289 // The plugin moved, so update our world transform. 290 // The plugin moved, so update our world transform.
290 UpdateTransform(); 291 UpdateTransform();
291 } 292 }
292 } 293 }
293 294
294 void WebPluginProxy::SetWindowlessBuffer( 295 void WebPluginProxy::SetWindowlessBuffer(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 void WebPluginProxy::InitiateHTTPRangeRequest(const char* url, 367 void WebPluginProxy::InitiateHTTPRangeRequest(const char* url,
367 const char* range_info, 368 const char* range_info,
368 void* existing_stream, 369 void* existing_stream,
369 bool notify_needed, 370 bool notify_needed,
370 HANDLE notify_data) { 371 HANDLE notify_data) {
371 372
372 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, 373 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url,
373 range_info, existing_stream, 374 range_info, existing_stream,
374 notify_needed, notify_data)); 375 notify_needed, notify_data));
375 } 376 }
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