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

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

Issue 125109: Refactor the PlatformContext layer to have only one class. (Closed)
Patch Set: Created 11 years, 6 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
« no previous file with comments | « chrome/browser/views/theme_helpers.cc ('k') | chrome/plugin/webplugin_proxy.cc » ('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) 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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/views/theme_helpers.cc ('k') | chrome/plugin/webplugin_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698