| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 CreateDIBAndCGContextFromHandle(windowless_buffer0, | 514 CreateDIBAndCGContextFromHandle(windowless_buffer0, |
| 515 window_rect, | 515 window_rect, |
| 516 &windowless_dibs_[0], | 516 &windowless_dibs_[0], |
| 517 &windowless_contexts_[0]); | 517 &windowless_contexts_[0]); |
| 518 CreateDIBAndCGContextFromHandle(windowless_buffer1, | 518 CreateDIBAndCGContextFromHandle(windowless_buffer1, |
| 519 window_rect, | 519 window_rect, |
| 520 &windowless_dibs_[1], | 520 &windowless_dibs_[1], |
| 521 &windowless_contexts_[1]); | 521 &windowless_contexts_[1]); |
| 522 } | 522 } |
| 523 | 523 |
| 524 #elif defined(USE_X11) | 524 #elif defined(TOOLKIT_GTK) |
| 525 | 525 |
| 526 void WebPluginProxy::CreateDIBAndCanvasFromHandle( | 526 void WebPluginProxy::CreateDIBAndCanvasFromHandle( |
| 527 const TransportDIB::Handle& dib_handle, | 527 const TransportDIB::Handle& dib_handle, |
| 528 const gfx::Rect& window_rect, | 528 const gfx::Rect& window_rect, |
| 529 scoped_refptr<SharedTransportDIB>* dib_out, | 529 scoped_refptr<SharedTransportDIB>* dib_out, |
| 530 skia::RefPtr<skia::PlatformCanvas>* canvas) { | 530 skia::RefPtr<skia::PlatformCanvas>* canvas) { |
| 531 TransportDIB* dib = TransportDIB::Map(dib_handle); | 531 TransportDIB* dib = TransportDIB::Map(dib_handle); |
| 532 // dib may be NULL if the renderer has already destroyed the TransportDIB by | 532 // dib may be NULL if the renderer has already destroyed the TransportDIB by |
| 533 // the time we receive the handle, e.g. in case of multiple resizes. | 533 // the time we receive the handle, e.g. in case of multiple resizes. |
| 534 if (dib) { | 534 if (dib) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 if (delegate_->IsWindowless() && use_shm_pixmap_) { | 580 if (delegate_->IsWindowless() && use_shm_pixmap_) { |
| 581 CreateShmPixmapFromDIB(windowless_dibs_[0]->dib(), | 581 CreateShmPixmapFromDIB(windowless_dibs_[0]->dib(), |
| 582 window_rect, | 582 window_rect, |
| 583 &windowless_shm_pixmaps_[0]); | 583 &windowless_shm_pixmaps_[0]); |
| 584 CreateShmPixmapFromDIB(windowless_dibs_[1]->dib(), | 584 CreateShmPixmapFromDIB(windowless_dibs_[1]->dib(), |
| 585 window_rect, | 585 window_rect, |
| 586 &windowless_shm_pixmaps_[1]); | 586 &windowless_shm_pixmaps_[1]); |
| 587 } | 587 } |
| 588 } | 588 } |
| 589 | 589 |
| 590 #elif defined(OS_ANDROID) | 590 #else |
| 591 | 591 |
| 592 void WebPluginProxy::SetWindowlessBuffers( | 592 void WebPluginProxy::SetWindowlessBuffers( |
| 593 const TransportDIB::Handle& windowless_buffer0, | 593 const TransportDIB::Handle& windowless_buffer0, |
| 594 const TransportDIB::Handle& windowless_buffer1, | 594 const TransportDIB::Handle& windowless_buffer1, |
| 595 const gfx::Rect& window_rect) { | 595 const gfx::Rect& window_rect) { |
| 596 NOTIMPLEMENTED(); | 596 NOTIMPLEMENTED(); |
| 597 } | 597 } |
| 598 | 598 |
| 599 #endif | 599 #endif |
| 600 | 600 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 int input_type; | 688 int input_type; |
| 689 gfx::Rect caret_rect; | 689 gfx::Rect caret_rect; |
| 690 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) | 690 if (!delegate_->GetIMEStatus(&input_type, &caret_rect)) |
| 691 return; | 691 return; |
| 692 | 692 |
| 693 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); | 693 Send(new PluginHostMsg_NotifyIMEStatus(route_id_, input_type, caret_rect)); |
| 694 } | 694 } |
| 695 #endif | 695 #endif |
| 696 | 696 |
| 697 } // namespace content | 697 } // namespace content |
| OLD | NEW |