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

Unified Diff: content/browser/renderer_host/display_link_mac.h

Issue 147493011: Use base::ScopedTypeRef for CGL types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
Index: content/browser/renderer_host/display_link_mac.h
diff --git a/content/browser/renderer_host/display_link_mac.h b/content/browser/renderer_host/display_link_mac.h
index 9398015f77a830d79d2017fece85b0a0d617dae6..690480b1448b6c1dad7cc6376b576bb067e1944f 100644
--- a/content/browser/renderer_host/display_link_mac.h
+++ b/content/browser/renderer_host/display_link_mac.h
@@ -5,8 +5,9 @@
#ifndef CONTENT_BROWSER_RENDERER_HOST_DISPLAY_LINK_MAC_H_
#define CONTENT_BROWSER_RENDERER_HOST_DISPLAY_LINK_MAC_H_
-#import <QuartzCore/CVDisplayLink.h>
+#include <QuartzCore/CVDisplayLink.h>
+#include "base/mac/scoped_typeref.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
@@ -25,8 +26,11 @@ class DisplayLinkMac : public base::RefCounted<DisplayLinkMac> {
private:
friend class base::RefCounted<DisplayLinkMac>;
+ typedef base::ScopedTypeRef<
+ CVDisplayLinkRef, CVDisplayLinkRetain, CVDisplayLinkRelease>
+ ScopedCVDisplayLinkRef;
- DisplayLinkMac(CVDisplayLinkRef display_link);
+ DisplayLinkMac(ScopedCVDisplayLinkRef display_link);
virtual ~DisplayLinkMac();
void StartOrContinueDisplayLink();
@@ -42,7 +46,7 @@ class DisplayLinkMac : public base::RefCounted<DisplayLinkMac> {
void* context);
// CVDisplayLink for querying VSync timing info.
- CVDisplayLinkRef display_link_;
+ ScopedCVDisplayLinkRef display_link_;
// Timer for stopping the display link if it has not been queried in
// the last second.

Powered by Google App Engine
This is Rietveld 408576698