OLD | NEW |
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/gdi_util.h" | 7 #include "base/gfx/gdi_util.h" |
8 #include "base/scoped_handle.h" | 8 #include "base/scoped_handle.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 NOTREACHED(); | 348 NOTREACHED(); |
349 return; | 349 return; |
350 } | 350 } |
351 | 351 |
352 hdc->Set(CreateCompatibleDC(NULL)); | 352 hdc->Set(CreateCompatibleDC(NULL)); |
353 if (hdc->Get() == NULL) { | 353 if (hdc->Get() == NULL) { |
354 NOTREACHED(); | 354 NOTREACHED(); |
355 return; | 355 return; |
356 } | 356 } |
357 | 357 |
358 gfx::PlatformDeviceWin::InitializeDC(hdc->Get()); | 358 skia::PlatformDeviceWin::InitializeDC(hdc->Get()); |
359 SelectObject(hdc->Get(), bitmap->Get()); | 359 SelectObject(hdc->Get(), bitmap->Get()); |
360 } | 360 } |
361 | 361 |
362 void WebPluginProxy::UpdateTransform() { | 362 void WebPluginProxy::UpdateTransform() { |
363 if (!windowless_hdc_) | 363 if (!windowless_hdc_) |
364 return; | 364 return; |
365 | 365 |
366 XFORM xf; | 366 XFORM xf; |
367 xf.eDx = static_cast<FLOAT>(-delegate_->rect().x()); | 367 xf.eDx = static_cast<FLOAT>(-delegate_->rect().x()); |
368 xf.eDy = static_cast<FLOAT>(-delegate_->rect().y()); | 368 xf.eDy = static_cast<FLOAT>(-delegate_->rect().y()); |
(...skipping 16 matching lines...) Expand all Loading... |
385 | 385 |
386 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, | 386 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, |
387 range_info, existing_stream, | 387 range_info, existing_stream, |
388 notify_needed, notify_data)); | 388 notify_needed, notify_data)); |
389 } | 389 } |
390 | 390 |
391 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { | 391 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { |
392 Paint(damaged_rect); | 392 Paint(damaged_rect); |
393 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); | 393 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); |
394 } | 394 } |
OLD | NEW |