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

Side by Side Diff: webkit/glue/webplugin_impl.cc

Issue 100046: More linux ifdef tweaks. This reverts my earlier change (13503).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 | « webkit/glue/webframe_impl.cc ('k') | webkit/tools/test_shell/test_shell.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 "config.h" 5 #include "config.h"
6 #include "webkit/glue/webplugin_impl.h" 6 #include "webkit/glue/webplugin_impl.h"
7 7
8 #include "Cursor.h" 8 #include "Cursor.h"
9 #include "Document.h" 9 #include "Document.h"
10 #include "DocumentLoader.h" 10 #include "DocumentLoader.h"
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 699
700 DCHECK(parent()->isFrameView()); 700 DCHECK(parent()->isFrameView());
701 WebCore::FrameView* view = static_cast<WebCore::FrameView*>(parent()); 701 WebCore::FrameView* view = static_cast<WebCore::FrameView*>(parent());
702 702
703 // The plugin is positioned in window coordinates, so it needs to be painted 703 // The plugin is positioned in window coordinates, so it needs to be painted
704 // in window coordinates. 704 // in window coordinates.
705 WebCore::IntPoint origin = view->windowToContents(WebCore::IntPoint(0, 0)); 705 WebCore::IntPoint origin = view->windowToContents(WebCore::IntPoint(0, 0));
706 gc->translate(static_cast<float>(origin.x()), 706 gc->translate(static_cast<float>(origin.x()),
707 static_cast<float>(origin.y())); 707 static_cast<float>(origin.y()));
708 708
709 #if defined(OS_WIN) || defined(TOOLKIT_GTK) 709 #if defined(OS_WIN) || defined(OS_LINUX)
710 // Note that |context| is only used when in windowless mode. 710 // Note that |context| is only used when in windowless mode.
711 gfx::NativeDrawingContext context = 711 gfx::NativeDrawingContext context =
712 gc->platformContext()->canvas()->beginPlatformPaint(); 712 gc->platformContext()->canvas()->beginPlatformPaint();
713 #elif defined(OS_MACOSX) 713 #elif defined(OS_MACOSX)
714 gfx::NativeDrawingContext context = gc->platformContext(); 714 gfx::NativeDrawingContext context = gc->platformContext();
715 #else
716 NOTIMPLEMENTED();
717 gfx::NativeDrawingContext context = NULL;
718 #endif 715 #endif
719 716
720 WebCore::IntRect window_rect = 717 WebCore::IntRect window_rect =
721 WebCore::IntRect(view->contentsToWindow(damage_rect.location()), 718 WebCore::IntRect(view->contentsToWindow(damage_rect.location()),
722 damage_rect.size()); 719 damage_rect.size());
723 720
724 delegate_->Paint(context, webkit_glue::FromIntRect(window_rect)); 721 delegate_->Paint(context, webkit_glue::FromIntRect(window_rect));
725 722
726 #if defined(OS_WIN) || defined(TOOLKIT_GTK) 723 #if defined(OS_WIN) || defined(OS_LINUX)
727 gc->platformContext()->canvas()->endPlatformPaint(); 724 gc->platformContext()->canvas()->endPlatformPaint();
728 #endif 725 #endif
729 gc->restore(); 726 gc->restore();
730 } 727 }
731 728
732 void WebPluginImpl::print(WebCore::GraphicsContext* gc) { 729 void WebPluginImpl::print(WebCore::GraphicsContext* gc) {
733 if (gc->paintingDisabled()) 730 if (gc->paintingDisabled())
734 return; 731 return;
735 732
736 if (!parent()) 733 if (!parent())
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 client_index = clients_.erase(client_index); 1420 client_index = clients_.erase(client_index);
1424 if (resource_client) 1421 if (resource_client)
1425 resource_client->DidFail(); 1422 resource_client->DidFail();
1426 } 1423 }
1427 1424
1428 // This needs to be called now and not in the destructor since the 1425 // This needs to be called now and not in the destructor since the
1429 // webframe_ might not be valid anymore. 1426 // webframe_ might not be valid anymore.
1430 webframe_->set_plugin_delegate(NULL); 1427 webframe_->set_plugin_delegate(NULL);
1431 webframe_ = NULL; 1428 webframe_ = NULL;
1432 } 1429 }
OLDNEW
« no previous file with comments | « webkit/glue/webframe_impl.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698