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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
475 // in our address space, or go wrong in some other way. | 475 // in our address space, or go wrong in some other way. |
476 HANDLE section; | 476 HANDLE section; |
477 DuplicateHandle(channel_->renderer_handle(), dib_handle, GetCurrentProcess(), | 477 DuplicateHandle(channel_->renderer_handle(), dib_handle, GetCurrentProcess(), |
478 §ion, | 478 §ion, |
479 STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ | FILE_MAP_WRITE, | 479 STANDARD_RIGHTS_REQUIRED | FILE_MAP_READ | FILE_MAP_WRITE, |
480 FALSE, 0); | 480 FALSE, 0); |
481 scoped_ptr<skia::PlatformCanvas> canvas(new skia::PlatformCanvas); | 481 scoped_ptr<skia::PlatformCanvas> canvas(new skia::PlatformCanvas); |
482 if (!canvas->initialize( | 482 if (!canvas->initialize( |
483 window_rect.width(), | 483 window_rect.width(), |
484 window_rect.height(), | 484 window_rect.height(), |
485 true, | 485 skia::PlatformDevice::FLAGS_OPAQUE | |
486 skia::PlatformDevice::FLAGS_INITIALIZED, | |
Jeff Timanus
2012/02/23 22:14:10
This initialization is within a #if WIN block, so
| |
486 section)) { | 487 section)) { |
487 canvas_out->reset(); | 488 canvas_out->reset(); |
488 } | 489 } |
489 canvas_out->reset(canvas.release()); | 490 canvas_out->reset(canvas.release()); |
490 // The canvas does not own the section so we need to close it now. | 491 // The canvas does not own the section so we need to close it now. |
491 CloseHandle(section); | 492 CloseHandle(section); |
492 } | 493 } |
493 | 494 |
494 void WebPluginProxy::SetWindowlessBuffers( | 495 void WebPluginProxy::SetWindowlessBuffers( |
495 const TransportDIB::Handle& windowless_buffer0, | 496 const TransportDIB::Handle& windowless_buffer0, |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
775 // Retrieve the IME status from a plug-in and send it to a renderer process | 776 // Retrieve the IME status from a plug-in and send it to a renderer process |
776 // when the plug-in has updated it. | 777 // when the plug-in has updated it. |
777 int input_type; | 778 int input_type; |
778 gfx::Rect caret_rect; | 779 gfx::Rect caret_rect; |
779 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) | 780 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) |
780 return; | 781 return; |
781 | 782 |
782 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); | 783 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); |
783 } | 784 } |
784 #endif | 785 #endif |
OLD | NEW |