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

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

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « content/plugin/webplugin_proxy.h ('k') | content/renderer/browser_plugin/browser_plugin.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) 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/plugin/webplugin_proxy.h" 5 #include "content/plugin/webplugin_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 InvalidateRect(damaged_rect_); 444 InvalidateRect(damaged_rect_);
445 } 445 }
446 } 446 }
447 447
448 #if defined(OS_WIN) 448 #if defined(OS_WIN)
449 449
450 void WebPluginProxy::CreateCanvasFromHandle( 450 void WebPluginProxy::CreateCanvasFromHandle(
451 const TransportDIB::Handle& dib_handle, 451 const TransportDIB::Handle& dib_handle,
452 const gfx::Rect& window_rect, 452 const gfx::Rect& window_rect,
453 SkAutoTUnref<skia::PlatformCanvas>* canvas) { 453 SkAutoTUnref<skia::PlatformCanvas>* canvas) {
454 canvas->reset(new skia::PlatformCanvas); 454 canvas->reset(skia::CreatePlatformCanvas(window_rect.width(),
455 if (!canvas->get()->initialize( 455 window_rect.height(),
456 window_rect.width(), 456 true,
457 window_rect.height(), 457 dib_handle,
458 true, 458 skia::RETURN_NULL_ON_FAILURE));
459 dib_handle)) {
460 canvas->reset(NULL);
461 }
462 // The canvas does not own the section so we need to close it now. 459 // The canvas does not own the section so we need to close it now.
463 CloseHandle(dib_handle); 460 CloseHandle(dib_handle);
464 } 461 }
465 462
466 void WebPluginProxy::SetWindowlessBuffers( 463 void WebPluginProxy::SetWindowlessBuffers(
467 const TransportDIB::Handle& windowless_buffer0, 464 const TransportDIB::Handle& windowless_buffer0,
468 const TransportDIB::Handle& windowless_buffer1, 465 const TransportDIB::Handle& windowless_buffer1,
469 const gfx::Rect& window_rect) { 466 const gfx::Rect& window_rect) {
470 CreateCanvasFromHandle(windowless_buffer0, 467 CreateCanvasFromHandle(windowless_buffer0,
471 window_rect, 468 window_rect,
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 int input_type; 724 int input_type;
728 gfx::Rect caret_rect; 725 gfx::Rect caret_rect;
729 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) 726 if (!delegate_->GetIMEStatus(&input_type, &caret_rect))
730 return; 727 return;
731 728
732 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); 729 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect));
733 } 730 }
734 #endif 731 #endif
735 732
736 } // namespace content 733 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/webplugin_proxy.h ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698