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/plugin/webplugin_delegate_stub.h" | 5 #include "chrome/plugin/webplugin_delegate_stub.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
10 #include "chrome/common/gfx/emf.h" | 10 #include "chrome/common/gfx/emf.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 webplugin_->DidPaint(); | 209 webplugin_->DidPaint(); |
210 } | 210 } |
211 | 211 |
212 void WebPluginDelegateStub::OnPrint(PluginMsg_PrintResponse_Params* params) { | 212 void WebPluginDelegateStub::OnPrint(PluginMsg_PrintResponse_Params* params) { |
213 gfx::Emf emf; | 213 gfx::Emf emf; |
214 if (!emf.CreateDc(NULL, NULL)) { | 214 if (!emf.CreateDc(NULL, NULL)) { |
215 NOTREACHED(); | 215 NOTREACHED(); |
216 return; | 216 return; |
217 } | 217 } |
218 HDC hdc = emf.hdc(); | 218 HDC hdc = emf.hdc(); |
219 gfx::PlatformDeviceWin::InitializeDC(hdc); | 219 skia::PlatformDeviceWin::InitializeDC(hdc); |
220 delegate_->Print(hdc); | 220 delegate_->Print(hdc); |
221 if (!emf.CloseDc()) { | 221 if (!emf.CloseDc()) { |
222 NOTREACHED(); | 222 NOTREACHED(); |
223 return; | 223 return; |
224 } | 224 } |
225 | 225 |
226 size_t size = emf.GetDataSize(); | 226 size_t size = emf.GetDataSize(); |
227 DCHECK(size); | 227 DCHECK(size); |
228 params->size = size; | 228 params->size = size; |
229 base::SharedMemory shared_buf; | 229 base::SharedMemory shared_buf; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 params.stream); | 334 params.stream); |
335 webplugin_->OnResourceCreated(params.resource_id, resource_client); | 335 webplugin_->OnResourceCreated(params.resource_id, resource_client); |
336 } | 336 } |
337 | 337 |
338 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, | 338 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, |
339 bool notify_needed, | 339 bool notify_needed, |
340 HANDLE notify_data) { | 340 HANDLE notify_data) { |
341 delegate_->URLRequestRouted(url, notify_needed, notify_data); | 341 delegate_->URLRequestRouted(url, notify_needed, notify_data); |
342 } | 342 } |
343 | 343 |
OLD | NEW |