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

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

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Syncing merge conflicts. Created 9 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/webkit_glue.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_gtk.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/glue/webmediaplayer_impl.h" 5 #include "webkit/glue/webmediaplayer_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 CGContextTranslateCTM(canvas, rect.x, rect.height + rect.y); 680 CGContextTranslateCTM(canvas, rect.x, rect.height + rect.y);
681 CGContextScaleCTM(canvas, inverse_scale_x, -inverse_scale_y); 681 CGContextScaleCTM(canvas, inverse_scale_x, -inverse_scale_y);
682 682
683 // We need a local variable CGRect version for DrawToContext. 683 // We need a local variable CGRect version for DrawToContext.
684 CGRect normalized_cgrect = 684 CGRect normalized_cgrect =
685 CGRectMake(normalized_rect.x(), normalized_rect.y(), 685 CGRectMake(normalized_rect.x(), normalized_rect.y(),
686 normalized_rect.width(), normalized_rect.height()); 686 normalized_rect.width(), normalized_rect.height());
687 687
688 // Copy the frame rendered to our temporary skia canvas onto the passed in 688 // Copy the frame rendered to our temporary skia canvas onto the passed in
689 // canvas. 689 // canvas.
690 skia_canvas_->getTopPlatformDevice().DrawToContext(canvas, 0, 0, 690 skia::DrawToNativeContext(skia_canvas_.get(), canvas, 0, 0,
691 &normalized_cgrect); 691 &normalized_cgrect);
692 692
693 CGContextRestoreGState(canvas); 693 CGContextRestoreGState(canvas);
694 #else 694 #else
695 NOTIMPLEMENTED() << "We only support rendering to skia or CG"; 695 NOTIMPLEMENTED() << "We only support rendering to skia or CG";
696 #endif 696 #endif
697 } 697 }
698 698
699 bool WebMediaPlayerImpl::hasSingleSecurityOrigin() const { 699 bool WebMediaPlayerImpl::hasSingleSecurityOrigin() const {
700 if (proxy_) 700 if (proxy_)
701 return proxy_->HasSingleOrigin(); 701 return proxy_->HasSingleOrigin();
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 } 922 }
923 } 923 }
924 924
925 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() { 925 WebKit::WebMediaPlayerClient* WebMediaPlayerImpl::GetClient() {
926 DCHECK(MessageLoop::current() == main_loop_); 926 DCHECK(MessageLoop::current() == main_loop_);
927 DCHECK(client_); 927 DCHECK(client_);
928 return client_; 928 return client_;
929 } 929 }
930 930
931 } // namespace webkit_glue 931 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.cc ('k') | webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698