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/renderer/npapi/webplugin_delegate_proxy.h" | 5 #include "content/renderer/npapi/webplugin_delegate_proxy.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 canvas->reset(skia::CreatePlatformCanvas( | 633 canvas->reset(skia::CreatePlatformCanvas( |
634 plugin_rect_.width(), plugin_rect_.height(), true, &((*memory)[0]), | 634 plugin_rect_.width(), plugin_rect_.height(), true, &((*memory)[0]), |
635 skia::CRASH_ON_FAILURE)); | 635 skia::CRASH_ON_FAILURE)); |
636 return true; | 636 return true; |
637 } | 637 } |
638 #endif | 638 #endif |
639 | 639 |
640 bool WebPluginDelegateProxy::CreateSharedBitmap( | 640 bool WebPluginDelegateProxy::CreateSharedBitmap( |
641 scoped_ptr<SharedMemoryBitmap>* memory, | 641 scoped_ptr<SharedMemoryBitmap>* memory, |
642 scoped_ptr<skia::PlatformCanvas>* canvas) { | 642 scoped_ptr<skia::PlatformCanvas>* canvas) { |
643 *memory = ChildThread::current() | 643 *memory = ChildThreadImpl::current() |
644 ->shared_bitmap_manager() | 644 ->shared_bitmap_manager() |
645 ->AllocateSharedMemoryBitmap(plugin_rect_.size()); | 645 ->AllocateSharedMemoryBitmap(plugin_rect_.size()); |
646 if (!memory->get()) | 646 if (!memory->get()) |
647 return false; | 647 return false; |
648 DCHECK((*memory)->shared_memory()); | 648 DCHECK((*memory)->shared_memory()); |
649 #if defined(OS_POSIX) | 649 #if defined(OS_POSIX) |
650 canvas->reset(skia::CreatePlatformCanvas( | 650 canvas->reset(skia::CreatePlatformCanvas( |
651 plugin_rect_.width(), plugin_rect_.height(), true, (*memory)->pixels(), | 651 plugin_rect_.width(), plugin_rect_.height(), true, (*memory)->pixels(), |
652 skia::RETURN_NULL_ON_FAILURE)); | 652 skia::RETURN_NULL_ON_FAILURE)); |
653 #else | 653 #else |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 | 1236 |
1237 plugin_->URLRedirectResponse(allow, resource_id); | 1237 plugin_->URLRedirectResponse(allow, resource_id); |
1238 } | 1238 } |
1239 | 1239 |
1240 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url, | 1240 void WebPluginDelegateProxy::OnCheckIfRunInsecureContent(const GURL& url, |
1241 bool* result) { | 1241 bool* result) { |
1242 *result = plugin_->CheckIfRunInsecureContent(url); | 1242 *result = plugin_->CheckIfRunInsecureContent(url); |
1243 } | 1243 } |
1244 | 1244 |
1245 } // namespace content | 1245 } // namespace content |
OLD | NEW |