Chromium Code Reviews| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 MSVC_PUSH_WARNING_LEVEL(0); | 10 MSVC_PUSH_WARNING_LEVEL(0); |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 704 WebCore::IntPoint origin = view->windowToContents(WebCore::IntPoint(0, 0)); | 704 WebCore::IntPoint origin = view->windowToContents(WebCore::IntPoint(0, 0)); |
| 705 gc->translate(static_cast<float>(origin.x()), | 705 gc->translate(static_cast<float>(origin.x()), |
| 706 static_cast<float>(origin.y())); | 706 static_cast<float>(origin.y())); |
| 707 | 707 |
| 708 #if defined(OS_WIN) | 708 #if defined(OS_WIN) |
| 709 // Note that |context| is only used when in windowless mode. | 709 // Note that |context| is only used when in windowless mode. |
| 710 gfx::NativeDrawingContext context = | 710 gfx::NativeDrawingContext context = |
| 711 gc->platformContext()->canvas()->beginPlatformPaint(); | 711 gc->platformContext()->canvas()->beginPlatformPaint(); |
| 712 #elif defined (OS_MACOSX) | 712 #elif defined (OS_MACOSX) |
| 713 gfx::NativeDrawingContext context = gc->platformContext(); | 713 gfx::NativeDrawingContext context = gc->platformContext(); |
| 714 #else | 714 #else |
|
darin (slow to review)
2009/03/04 07:00:35
#elif defined(OS_LINUX)
can you also fix the bad
| |
| 715 // TODO(port): the equivalent of the above. | 715 skia::PlatformDeviceLinux::XDrawable context = |
| 716 void* context = NULL; // Temporary, to reduce ifdefs. | 716 gc->platformContext()->canvas()->getXDrawable(); |
| 717 #endif | 717 #endif |
| 718 | 718 |
| 719 WebCore::IntRect window_rect = | 719 WebCore::IntRect window_rect = |
| 720 WebCore::IntRect(view->contentsToWindow(damage_rect.location()), | 720 WebCore::IntRect(view->contentsToWindow(damage_rect.location()), |
| 721 damage_rect.size()); | 721 damage_rect.size()); |
| 722 | 722 |
| 723 delegate_->Paint(context, webkit_glue::FromIntRect(window_rect)); | 723 delegate_->Paint((void*)context, webkit_glue::FromIntRect(window_rect)); |
|
darin (slow to review)
2009/03/04 07:00:35
reinterpret_cast
| |
| 724 | 724 |
| 725 #if defined(OS_WIN) | 725 #if defined(OS_WIN) |
| 726 gc->platformContext()->canvas()->endPlatformPaint(); | 726 gc->platformContext()->canvas()->endPlatformPaint(); |
| 727 #endif | 727 #endif |
| 728 gc->restore(); | 728 gc->restore(); |
| 729 } | 729 } |
| 730 | 730 |
| 731 void WebPluginImpl::print(WebCore::GraphicsContext* gc) { | 731 void WebPluginImpl::print(WebCore::GraphicsContext* gc) { |
| 732 if (gc->paintingDisabled()) | 732 if (gc->paintingDisabled()) |
| 733 return; | 733 return; |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1416 client_index = clients_.erase(client_index); | 1416 client_index = clients_.erase(client_index); |
| 1417 if (resource_client) | 1417 if (resource_client) |
| 1418 resource_client->DidFail(); | 1418 resource_client->DidFail(); |
| 1419 } | 1419 } |
| 1420 | 1420 |
| 1421 // This needs to be called now and not in the destructor since the | 1421 // This needs to be called now and not in the destructor since the |
| 1422 // webframe_ might not be valid anymore. | 1422 // webframe_ might not be valid anymore. |
| 1423 webframe_->set_plugin_delegate(NULL); | 1423 webframe_->set_plugin_delegate(NULL); |
| 1424 webframe_ = NULL; | 1424 webframe_ = NULL; |
| 1425 } | 1425 } |
| OLD | NEW |