Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: content/plugin/webplugin_delegate_stub.cc

Issue 6695013: Cleanup NativeMetafile (win) interface and EMF class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_delegate_stub.h" 5 #include "content/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 "content/common/content_client.h" 10 #include "content/common/content_client.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 266
267 void WebPluginDelegateStub::OnDidPaint() { 267 void WebPluginDelegateStub::OnDidPaint() {
268 webplugin_->DidPaint(); 268 webplugin_->DidPaint();
269 } 269 }
270 270
271 void WebPluginDelegateStub::OnPrint(base::SharedMemoryHandle* shared_memory, 271 void WebPluginDelegateStub::OnPrint(base::SharedMemoryHandle* shared_memory,
272 uint32* size) { 272 uint32* size) {
273 #if defined(OS_WIN) 273 #if defined(OS_WIN)
274 scoped_ptr<printing::NativeMetafile> metafile( 274 scoped_ptr<printing::NativeMetafile> metafile(
275 printing::NativeMetafileFactory::CreateMetafile()); 275 printing::NativeMetafileFactory::CreateMetafile());
276 if (!metafile->CreateDc(NULL, NULL)) { 276 if (!metafile->Init()) {
277 NOTREACHED(); 277 NOTREACHED();
278 return; 278 return;
279 } 279 }
280 HDC hdc = metafile->context(); 280 HDC hdc = metafile->context();
281 skia::PlatformDevice::InitializeDC(hdc); 281 skia::PlatformDevice::InitializeDC(hdc);
282 delegate_->Print(hdc); 282 delegate_->Print(hdc);
283 if (!metafile->Close()) { 283 if (!metafile->Close()) {
284 NOTREACHED(); 284 NOTREACHED();
285 return; 285 return;
286 } 286 }
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 webplugin_->OnResourceCreated(resource_id, resource_client); 442 webplugin_->OnResourceCreated(resource_id, resource_client);
443 } 443 }
444 444
445 #if defined(OS_MACOSX) 445 #if defined(OS_MACOSX)
446 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle( 446 void WebPluginDelegateStub::OnSetFakeAcceleratedSurfaceWindowHandle(
447 gfx::PluginWindowHandle window) { 447 gfx::PluginWindowHandle window) {
448 delegate_->set_windowed_handle(window); 448 delegate_->set_windowed_handle(window);
449 } 449 }
450 #endif 450 #endif
451 451
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698