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

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

Issue 1320783002: Make SharedMemoryHandle a class on windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_global
Patch Set: Rebase. Created 5 years, 2 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 | « content/gpu/gpu_child_thread.cc ('k') | content/ppapi_plugin/ppapi_thread.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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 InvalidateRect(damaged_rect_); 411 InvalidateRect(damaged_rect_);
412 } 412 }
413 } 413 }
414 414
415 #if defined(OS_WIN) 415 #if defined(OS_WIN)
416 416
417 void WebPluginProxy::CreateCanvasFromHandle( 417 void WebPluginProxy::CreateCanvasFromHandle(
418 const TransportDIB::Handle& dib_handle, 418 const TransportDIB::Handle& dib_handle,
419 const gfx::Rect& window_rect, 419 const gfx::Rect& window_rect,
420 skia::RefPtr<skia::PlatformCanvas>* canvas) { 420 skia::RefPtr<skia::PlatformCanvas>* canvas) {
421 *canvas = skia::AdoptRef( 421 *canvas = skia::AdoptRef(skia::CreatePlatformCanvas(
422 skia::CreatePlatformCanvas(window_rect.width(), 422 window_rect.width(), window_rect.height(), true, dib_handle.GetHandle(),
423 window_rect.height(), 423 skia::RETURN_NULL_ON_FAILURE));
424 true,
425 dib_handle,
426 skia::RETURN_NULL_ON_FAILURE));
427 // The canvas does not own the section so we need to close it now. 424 // The canvas does not own the section so we need to close it now.
428 CloseHandle(dib_handle); 425 dib_handle.Close();
429 } 426 }
430 427
431 void WebPluginProxy::SetWindowlessBuffers( 428 void WebPluginProxy::SetWindowlessBuffers(
432 const TransportDIB::Handle& windowless_buffer0, 429 const TransportDIB::Handle& windowless_buffer0,
433 const TransportDIB::Handle& windowless_buffer1, 430 const TransportDIB::Handle& windowless_buffer1,
434 const gfx::Rect& window_rect) { 431 const gfx::Rect& window_rect) {
435 CreateCanvasFromHandle(windowless_buffer0, 432 CreateCanvasFromHandle(windowless_buffer0,
436 window_rect, 433 window_rect,
437 &windowless_canvases_[0]); 434 &windowless_canvases_[0]);
438 if (!windowless_canvases_[0]) { 435 if (!windowless_canvases_[0]) {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 int input_type; 604 int input_type;
608 gfx::Rect caret_rect; 605 gfx::Rect caret_rect;
609 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) 606 if (!delegate_->GetIMEStatus(&input_type, &caret_rect))
610 return; 607 return;
611 608
612 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); 609 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect));
613 } 610 }
614 #endif 611 #endif
615 612
616 } // namespace content 613 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/ppapi_plugin/ppapi_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698