| Index: chrome/default_plugin/plugin_impl_mac.mm
|
| diff --git a/chrome/default_plugin/plugin_impl_mac.mm b/chrome/default_plugin/plugin_impl_mac.mm
|
| index eb0ee08e711d3f92541e02df7b24de1aab43a223..b6deb280604a019a7d1bb8af9baecea5ed231825 100644
|
| --- a/chrome/default_plugin/plugin_impl_mac.mm
|
| +++ b/chrome/default_plugin/plugin_impl_mac.mm
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2011 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.
|
|
|
| @@ -17,6 +17,7 @@
|
| #include "ui/base/l10n/l10n_util_mac.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/image/image.h"
|
| +#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
|
| #include "unicode/locid.h"
|
| #include "webkit/glue/webkit_glue.h"
|
| #include "webkit/plugins/npapi/default_plugin_shared.h"
|
| @@ -139,7 +140,7 @@ void PluginInstallerImpl::DownloadCancelled() {
|
| }
|
|
|
| int16 PluginInstallerImpl::OnDrawRect(CGContextRef context, CGRect dirty_rect) {
|
| - [NSGraphicsContext saveGraphicsState];
|
| + gfx::ScopedNSGraphicsContextSaveGState scoped_state;
|
| NSGraphicsContext* ns_context = [NSGraphicsContext
|
| graphicsContextWithGraphicsPort:context flipped:YES];
|
| [NSGraphicsContext setCurrentContext:ns_context];
|
| @@ -183,7 +184,6 @@ int16 PluginInstallerImpl::OnDrawRect(CGContextRef context, CGRect dirty_rect) {
|
| label_point = NSMakePoint(roundf(label_point.x), roundf(label_point.y));
|
| [command_ drawAtPoint:label_point withAttributes:attributes];
|
|
|
| - [NSGraphicsContext restoreGraphicsState];
|
| return 1;
|
| }
|
|
|
|
|