OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/renderer/webplugin_delegate_proxy.h" | 5 #include "chrome/renderer/webplugin_delegate_proxy.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 | 8 |
9 #include "generated_resources.h" | 9 #include "generated_resources.h" |
10 | 10 |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 transport_store_.reset(); | 391 transport_store_.reset(); |
392 backing_store_canvas_.reset(); | 392 backing_store_canvas_.reset(); |
393 transport_store_canvas_.reset(); | 393 transport_store_canvas_.reset(); |
394 background_store_.reset(); | 394 background_store_.reset(); |
395 background_store_canvas_.release(); | 395 background_store_canvas_.release(); |
396 backing_store_painted_ = gfx::Rect(); | 396 backing_store_painted_ = gfx::Rect(); |
397 } | 397 } |
398 | 398 |
399 bool WebPluginDelegateProxy::CreateBitmap( | 399 bool WebPluginDelegateProxy::CreateBitmap( |
400 scoped_ptr<base::SharedMemory>* memory, | 400 scoped_ptr<base::SharedMemory>* memory, |
401 scoped_ptr<gfx::PlatformCanvasWin>* canvas) { | 401 scoped_ptr<skia::PlatformCanvasWin>* canvas) { |
402 size_t size = GetPaintBufSize(plugin_rect_); | 402 size_t size = GetPaintBufSize(plugin_rect_); |
403 scoped_ptr<base::SharedMemory> new_shared_memory(new base::SharedMemory()); | 403 scoped_ptr<base::SharedMemory> new_shared_memory(new base::SharedMemory()); |
404 if (!new_shared_memory->Create(L"", false, true, size)) | 404 if (!new_shared_memory->Create(L"", false, true, size)) |
405 return false; | 405 return false; |
406 | 406 |
407 scoped_ptr<gfx::PlatformCanvasWin> new_canvas(new gfx::PlatformCanvasWin); | 407 scoped_ptr<skia::PlatformCanvasWin> new_canvas(new skia::PlatformCanvasWin); |
408 if (!new_canvas->initialize(plugin_rect_.width(), plugin_rect_.height(), | 408 if (!new_canvas->initialize(plugin_rect_.width(), plugin_rect_.height(), |
409 true, new_shared_memory->handle())) { | 409 true, new_shared_memory->handle())) { |
410 return false; | 410 return false; |
411 } | 411 } |
412 | 412 |
413 memory->swap(new_shared_memory); | 413 memory->swap(new_shared_memory); |
414 canvas->swap(new_canvas); | 414 canvas->swap(new_canvas); |
415 return true; | 415 return true; |
416 } | 416 } |
417 | 417 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 plugin_->CancelDocumentLoad(); | 739 plugin_->CancelDocumentLoad(); |
740 } | 740 } |
741 | 741 |
742 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest( | 742 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest( |
743 const std::string& url, const std::string& range_info, | 743 const std::string& url, const std::string& range_info, |
744 HANDLE existing_stream, bool notify_needed, HANDLE notify_data) { | 744 HANDLE existing_stream, bool notify_needed, HANDLE notify_data) { |
745 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), | 745 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), |
746 existing_stream, notify_needed, | 746 existing_stream, notify_needed, |
747 notify_data); | 747 notify_data); |
748 } | 748 } |
OLD | NEW |