| 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 void WebPluginDelegateStub::OnPrint(base::SharedMemoryHandle* shared_memory, | 230 void WebPluginDelegateStub::OnPrint(base::SharedMemoryHandle* shared_memory, |
| 231 size_t* size) { | 231 size_t* size) { |
| 232 #if defined(OS_WIN) | 232 #if defined(OS_WIN) |
| 233 gfx::Emf emf; | 233 gfx::Emf emf; |
| 234 if (!emf.CreateDc(NULL, NULL)) { | 234 if (!emf.CreateDc(NULL, NULL)) { |
| 235 NOTREACHED(); | 235 NOTREACHED(); |
| 236 return; | 236 return; |
| 237 } | 237 } |
| 238 HDC hdc = emf.hdc(); | 238 HDC hdc = emf.hdc(); |
| 239 skia::PlatformDeviceWin::InitializeDC(hdc); | 239 skia::PlatformDevice::InitializeDC(hdc); |
| 240 delegate_->Print(hdc); | 240 delegate_->Print(hdc); |
| 241 if (!emf.CloseDc()) { | 241 if (!emf.CloseDc()) { |
| 242 NOTREACHED(); | 242 NOTREACHED(); |
| 243 return; | 243 return; |
| 244 } | 244 } |
| 245 | 245 |
| 246 *size = emf.GetDataSize(); | 246 *size = emf.GetDataSize(); |
| 247 DCHECK(*size); | 247 DCHECK(*size); |
| 248 base::SharedMemory shared_buf; | 248 base::SharedMemory shared_buf; |
| 249 CreateSharedBuffer(*size, &shared_buf, shared_memory); | 249 CreateSharedBuffer(*size, &shared_buf, shared_memory); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 params.notify_data, | 360 params.notify_data, |
| 361 params.stream); | 361 params.stream); |
| 362 webplugin_->OnResourceCreated(params.resource_id, resource_client); | 362 webplugin_->OnResourceCreated(params.resource_id, resource_client); |
| 363 } | 363 } |
| 364 | 364 |
| 365 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, | 365 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, |
| 366 bool notify_needed, | 366 bool notify_needed, |
| 367 intptr_t notify_data) { | 367 intptr_t notify_data) { |
| 368 delegate_->URLRequestRouted(url, notify_needed, notify_data); | 368 delegate_->URLRequestRouted(url, notify_needed, notify_data); |
| 369 } | 369 } |
| OLD | NEW |