OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/child/npapi/webplugin_delegate_impl.h" | 5 #include "content/child/npapi/webplugin_delegate_impl.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 #import <QuartzCore/QuartzCore.h> | 8 #import <QuartzCore/QuartzCore.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 } | 268 } |
269 | 269 |
270 void WebPluginDelegateImpl::UpdateGeometryAndContext( | 270 void WebPluginDelegateImpl::UpdateGeometryAndContext( |
271 const gfx::Rect& window_rect, const gfx::Rect& clip_rect, | 271 const gfx::Rect& window_rect, const gfx::Rect& clip_rect, |
272 CGContextRef context) { | 272 CGContextRef context) { |
273 buffer_context_ = context; | 273 buffer_context_ = context; |
274 UpdateGeometry(window_rect, clip_rect); | 274 UpdateGeometry(window_rect, clip_rect); |
275 } | 275 } |
276 | 276 |
277 void WebPluginDelegateImpl::Paint(SkCanvas* canvas, const gfx::Rect& rect) { | 277 void WebPluginDelegateImpl::Paint(SkCanvas* canvas, const gfx::Rect& rect) { |
278 gfx::SkiaBitLocker bit_locker(canvas); | 278 skia::SkiaBitLocker bit_locker(canvas); |
279 CGContextRef context = bit_locker.cgContext(); | 279 CGContextRef context = bit_locker.cgContext(); |
280 CGPaint(context, rect); | 280 CGPaint(context, rect); |
281 } | 281 } |
282 | 282 |
283 void WebPluginDelegateImpl::CGPaint(CGContextRef context, | 283 void WebPluginDelegateImpl::CGPaint(CGContextRef context, |
284 const gfx::Rect& rect) { | 284 const gfx::Rect& rect) { |
285 WindowlessPaint(context, rect); | 285 WindowlessPaint(context, rect); |
286 } | 286 } |
287 | 287 |
288 bool WebPluginDelegateImpl::PlatformHandleInputEvent( | 288 bool WebPluginDelegateImpl::PlatformHandleInputEvent( |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 window_rect_.width(), window_rect_.height())]; | 714 window_rect_.width(), window_rect_.height())]; |
715 [CATransaction commit]; | 715 [CATransaction commit]; |
716 | 716 |
717 [renderer_ setBounds:[layer_ bounds]]; | 717 [renderer_ setBounds:[layer_ bounds]]; |
718 surface_->SetSize(window_rect_.size()); | 718 surface_->SetSize(window_rect_.size()); |
719 // Kick off the drawing timer, if necessary. | 719 // Kick off the drawing timer, if necessary. |
720 PluginVisibilityChanged(); | 720 PluginVisibilityChanged(); |
721 } | 721 } |
722 | 722 |
723 } // namespace content | 723 } // namespace content |
OLD | NEW |