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

Side by Side Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 6709009: Stop overloading Init() in NativeMetafile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/renderer/mock_printer.cc ('k') | printing/emf_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/renderer/webplugin_delegate_proxy.h" 5 #include "chrome/renderer/webplugin_delegate_proxy.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 918
919 base::SharedMemory memory(shared_memory, true); 919 base::SharedMemory memory(shared_memory, true);
920 if (!memory.Map(size)) { 920 if (!memory.Map(size)) {
921 NOTREACHED(); 921 NOTREACHED();
922 return; 922 return;
923 } 923 }
924 924
925 #if defined(OS_WIN) 925 #if defined(OS_WIN)
926 scoped_ptr<printing::NativeMetafile> metafile( 926 scoped_ptr<printing::NativeMetafile> metafile(
927 printing::NativeMetafileFactory::CreateMetafile()); 927 printing::NativeMetafileFactory::CreateMetafile());
928 if (!metafile->Init(memory.memory(), size)) { 928 if (!metafile->InitFromData(memory.memory(), size)) {
929 NOTREACHED(); 929 NOTREACHED();
930 return; 930 return;
931 } 931 }
932 // Playback the buffer. 932 // Playback the buffer.
933 metafile->Playback(context, NULL); 933 metafile->Playback(context, NULL);
934 #else 934 #else
935 // TODO(port): plugin printing. 935 // TODO(port): plugin printing.
936 NOTIMPLEMENTED(); 936 NOTIMPLEMENTED();
937 #endif 937 #endif
938 } 938 }
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 } 1420 }
1421 #endif 1421 #endif
1422 1422
1423 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, 1423 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow,
1424 int resource_id) { 1424 int resource_id) {
1425 if (!plugin_) 1425 if (!plugin_)
1426 return; 1426 return;
1427 1427
1428 plugin_->URLRedirectResponse(allow, resource_id); 1428 plugin_->URLRedirectResponse(allow, resource_id);
1429 } 1429 }
OLDNEW
« no previous file with comments | « chrome/renderer/mock_printer.cc ('k') | printing/emf_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698