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

Unified Diff: webkit/plugins/npapi/quickdraw_drawing_manager_mac.cc

Issue 10628004: Remove support for the QuickDraw NPAPI drawing model (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Switch test plugin to CG Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/npapi/quickdraw_drawing_manager_mac.h ('k') | webkit/plugins/npapi/test/plugin_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/quickdraw_drawing_manager_mac.cc
diff --git a/webkit/plugins/npapi/quickdraw_drawing_manager_mac.cc b/webkit/plugins/npapi/quickdraw_drawing_manager_mac.cc
deleted file mode 100644
index 0772777ce2067b2e2cee19179180ab5f1a0913f4..0000000000000000000000000000000000000000
--- a/webkit/plugins/npapi/quickdraw_drawing_manager_mac.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NP_NO_QUICKDRAW
-
-#include "webkit/plugins/npapi/quickdraw_drawing_manager_mac.h"
-
-#include "webkit/plugins/npapi/coregraphics_private_symbols_mac.h"
-
-// Turn off GCC warnings about deprecated functions (since QuickDraw is a
-// deprecated API). According to the GCC documentation, this can only be done
-// per file, not pushed and popped like some options can be.
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
-namespace webkit {
-namespace npapi {
-
-QuickDrawDrawingManager::QuickDrawDrawingManager()
- : plugin_window_(NULL), target_context_(NULL), current_port_(NULL) {}
-
-QuickDrawDrawingManager::~QuickDrawDrawingManager() {
-}
-
-void QuickDrawDrawingManager::SetTargetContext(CGContextRef context,
- const gfx::Size& plugin_size) {
- target_context_ = context;
- plugin_size_ = plugin_size;
-}
-
-void QuickDrawDrawingManager::SetPluginWindow(WindowRef window) {
- plugin_window_ = window;
- current_port_ = GetWindowPort(window);
-}
-
-void QuickDrawDrawingManager::UpdateContext() {
- ScrapeWindow(plugin_window_, target_context_, plugin_size_);
-}
-
-void QuickDrawDrawingManager::MakePortCurrent() {
- SetPort(current_port_);
-}
-
-void QuickDrawDrawingManager::ScrapeWindow(WindowRef window,
- CGContextRef target_context,
- const gfx::Size& plugin_size) {
- if (!target_context)
- return;
-
- CGRect window_bounds = CGRectMake(0, 0,
- plugin_size.width(),
- plugin_size.height());
- CGWindowID window_id = HIWindowGetCGWindowID(window);
- CGContextSaveGState(target_context);
- CGContextTranslateCTM(target_context, 0, plugin_size.height());
- CGContextScaleCTM(target_context, 1.0, -1.0);
- CGContextCopyWindowCaptureContentsToRect(target_context, window_bounds,
- _CGSDefaultConnection(),
- window_id, 0);
- CGContextRestoreGState(target_context);
-}
-
-} // namespace npapi
-} // namespace webkit
-
-#endif // !NP_NO_QUICKDRAW
« no previous file with comments | « webkit/plugins/npapi/quickdraw_drawing_manager_mac.h ('k') | webkit/plugins/npapi/test/plugin_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698