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

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

Issue 165344: Add an UpdateContext call to WebPluginDelegateImpl on the Mac. (Closed)
Patch Set: Stripped down to Mac-only Created 11 years, 4 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
« no previous file with comments | « no previous file | webkit/glue/plugins/webplugin_delegate_impl.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "build/build_config.h" 7 #include "build/build_config.h"
8 #if defined(OS_LINUX) 8 #if defined(OS_LINUX)
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 #endif 10 #endif
(...skipping 11 matching lines...) Expand all
22 #include "chrome/common/child_process_logging.h" 22 #include "chrome/common/child_process_logging.h"
23 #include "chrome/common/plugin_messages.h" 23 #include "chrome/common/plugin_messages.h"
24 #include "chrome/common/url_constants.h" 24 #include "chrome/common/url_constants.h"
25 #include "chrome/plugin/npobject_proxy.h" 25 #include "chrome/plugin/npobject_proxy.h"
26 #include "chrome/plugin/npobject_util.h" 26 #include "chrome/plugin/npobject_util.h"
27 #include "chrome/plugin/plugin_channel.h" 27 #include "chrome/plugin/plugin_channel.h"
28 #include "chrome/plugin/plugin_thread.h" 28 #include "chrome/plugin/plugin_thread.h"
29 #include "chrome/plugin/webplugin_delegate_stub.h" 29 #include "chrome/plugin/webplugin_delegate_stub.h"
30 #include "skia/ext/platform_device.h" 30 #include "skia/ext/platform_device.h"
31 #include "webkit/api/public/WebBindings.h" 31 #include "webkit/api/public/WebBindings.h"
32 #include "webkit/glue/plugins/webplugin_delegate_impl.h"
32 #include "webkit/glue/webplugin_delegate.h" 33 #include "webkit/glue/webplugin_delegate.h"
33 34
34 #if defined(OS_WIN) 35 #if defined(OS_WIN)
35 #include "base/gfx/gdi_util.h" 36 #include "base/gfx/gdi_util.h"
36 #endif 37 #endif
37 38
38 using WebKit::WebBindings; 39 using WebKit::WebBindings;
39 40
40 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap; 41 typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap;
41 static ContextMap& GetContextMap() { 42 static ContextMap& GetContextMap() {
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 delegate_->GetRect().width(), 619 delegate_->GetRect().width(),
619 delegate_->GetRect().height(), 620 delegate_->GetRect().height(),
620 8, 4 * delegate_->GetRect().width(), 621 8, 4 * delegate_->GetRect().width(),
621 rgb_colorspace, 622 rgb_colorspace,
622 kCGImageAlphaPremultipliedFirst | 623 kCGImageAlphaPremultipliedFirst |
623 kCGBitmapByteOrder32Host)); 624 kCGBitmapByteOrder32Host));
624 CGContextTranslateCTM(background_context_, 0, 625 CGContextTranslateCTM(background_context_, 0,
625 delegate_->GetRect().height()); 626 delegate_->GetRect().height());
626 CGContextScaleCTM(background_context_, 1, -1); 627 CGContextScaleCTM(background_context_, 1, -1);
627 } 628 }
629
630 static_cast<WebPluginDelegateImpl*>(delegate_)->UpdateContext(
631 windowless_context_);
628 } 632 }
629 #elif defined (OS_LINUX) 633 #elif defined (OS_LINUX)
630 void WebPluginProxy::UpdateTransform() { 634 void WebPluginProxy::UpdateTransform() {
631 } 635 }
632 636
633 void WebPluginProxy::SetWindowlessBuffer( 637 void WebPluginProxy::SetWindowlessBuffer(
634 const TransportDIB::Handle& windowless_buffer, 638 const TransportDIB::Handle& windowless_buffer,
635 const TransportDIB::Handle& background_buffer) { 639 const TransportDIB::Handle& background_buffer) {
636 int width = delegate_->GetRect().width(); 640 int width = delegate_->GetRect().width();
637 int height = delegate_->GetRect().height(); 641 int height = delegate_->GetRect().height();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 while (index != resource_clients_.end()) { 692 while (index != resource_clients_.end()) {
689 WebPluginResourceClient* client = (*index).second; 693 WebPluginResourceClient* client = (*index).second;
690 694
691 if (client == resource_client) { 695 if (client == resource_client) {
692 resource_clients_.erase(index++); 696 resource_clients_.erase(index++);
693 } else { 697 } else {
694 index++; 698 index++;
695 } 699 }
696 } 700 }
697 } 701 }
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/plugins/webplugin_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698