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/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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 return; | 496 return; |
497 } | 497 } |
498 } | 498 } |
499 | 499 |
500 #elif defined(OS_MACOSX) | 500 #elif defined(OS_MACOSX) |
501 | 501 |
502 void WebPluginProxy::CreateDIBAndCGContextFromHandle( | 502 void WebPluginProxy::CreateDIBAndCGContextFromHandle( |
503 const TransportDIB::Handle& dib_handle, | 503 const TransportDIB::Handle& dib_handle, |
504 const gfx::Rect& window_rect, | 504 const gfx::Rect& window_rect, |
505 scoped_ptr<TransportDIB>* dib_out, | 505 scoped_ptr<TransportDIB>* dib_out, |
506 base::mac::ScopedCFTypeRef<CGContextRef>* cg_context_out) { | 506 base::ScopedCFTypeRef<CGContextRef>* cg_context_out) { |
507 // Convert the shared memory handle to a handle that works in our process, | 507 // Convert the shared memory handle to a handle that works in our process, |
508 // and then use that to create a CGContextRef. | 508 // and then use that to create a CGContextRef. |
509 TransportDIB* dib = TransportDIB::Map(dib_handle); | 509 TransportDIB* dib = TransportDIB::Map(dib_handle); |
510 CGContextRef cg_context = NULL; | 510 CGContextRef cg_context = NULL; |
511 if (dib) { | 511 if (dib) { |
512 cg_context = CGBitmapContextCreate( | 512 cg_context = CGBitmapContextCreate( |
513 dib->memory(), | 513 dib->memory(), |
514 window_rect.width(), | 514 window_rect.width(), |
515 window_rect.height(), | 515 window_rect.height(), |
516 8, | 516 8, |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 int input_type; | 705 int input_type; |
706 gfx::Rect caret_rect; | 706 gfx::Rect caret_rect; |
707 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) | 707 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) |
708 return; | 708 return; |
709 | 709 |
710 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); | 710 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); |
711 } | 711 } |
712 #endif | 712 #endif |
713 | 713 |
714 } // namespace content | 714 } // namespace content |
OLD | NEW |