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

Side by Side Diff: content/child/npapi/webplugin_delegate_impl_mac.mm

Issue 23684023: Move the WebPluginResourceClient interface to its own header. Also fix up method order in webplugin… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 3 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
OLDNEW
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
268 layer_ = nil; 268 layer_ = nil;
269 } 269 }
270 270
271 void WebPluginDelegateImpl::UpdateGeometryAndContext( 271 void WebPluginDelegateImpl::UpdateGeometryAndContext(
272 const gfx::Rect& window_rect, const gfx::Rect& clip_rect, 272 const gfx::Rect& window_rect, const gfx::Rect& clip_rect,
273 CGContextRef context) { 273 CGContextRef context) {
274 buffer_context_ = context; 274 buffer_context_ = context;
275 UpdateGeometry(window_rect, clip_rect); 275 UpdateGeometry(window_rect, clip_rect);
276 } 276 }
277 277
278 void WebPluginDelegateImpl::Paint(WebKit::WebCanvas* canvas, 278 void WebPluginDelegateImpl::Paint(SkCanvas* canvas, const gfx::Rect& rect) {
279 const gfx::Rect& rect) {
280 gfx::SkiaBitLocker bit_locker(canvas); 279 gfx::SkiaBitLocker bit_locker(canvas);
281 CGContextRef context = bit_locker.cgContext(); 280 CGContextRef context = bit_locker.cgContext();
282 CGPaint(context, rect); 281 CGPaint(context, rect);
283 } 282 }
284 283
285 void WebPluginDelegateImpl::CGPaint(CGContextRef context, 284 void WebPluginDelegateImpl::CGPaint(CGContextRef context,
286 const gfx::Rect& rect) { 285 const gfx::Rect& rect) {
287 WindowlessPaint(context, rect); 286 WindowlessPaint(context, rect);
288 } 287 }
289 288
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 window_rect_.width(), window_rect_.height())]; 718 window_rect_.width(), window_rect_.height())];
720 [CATransaction commit]; 719 [CATransaction commit];
721 720
722 [renderer_ setBounds:[layer_ bounds]]; 721 [renderer_ setBounds:[layer_ bounds]];
723 surface_->SetSize(window_rect_.size()); 722 surface_->SetSize(window_rect_.size());
724 // Kick off the drawing timer, if necessary. 723 // Kick off the drawing timer, if necessary.
725 PluginVisibilityChanged(); 724 PluginVisibilityChanged();
726 } 725 }
727 726
728 } // namespace content 727 } // namespace content
OLDNEW
« no previous file with comments | « content/child/npapi/webplugin_delegate_impl_gtk.cc ('k') | content/child/npapi/webplugin_delegate_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698