summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 16:29:58 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 16:29:58 +0000
commit1666e21c2fc0ae35247f745b5e5cee261f34f41b (patch)
tree2554508dd188591568b3ae71f6c56795e0e7bd4a /chrome
parent414fde59e8dd46b0a93dbfaea4376ffe59bdf9f9 (diff)
downloadchromium_src-1666e21c2fc0ae35247f745b5e5cee261f34f41b.zip
chromium_src-1666e21c2fc0ae35247f745b5e5cee261f34f41b.tar.gz
chromium_src-1666e21c2fc0ae35247f745b5e5cee261f34f41b.tar.bz2
Turning timer back on, invalidating timer when removing from superview. Still playing with tab_cold perf test.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/cocoa/throbber_view.mm9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/throbber_view.mm b/chrome/browser/cocoa/throbber_view.mm
index b6b48c3..b8a517e 100644
--- a/chrome/browser/cocoa/throbber_view.mm
+++ b/chrome/browser/cocoa/throbber_view.mm
@@ -50,7 +50,6 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
DCHECK(numFrames_);
image_.reset([image retain]);
-#if 0
// Start a timer for the animation frames.
target_.reset([[TimerTarget alloc] initWithThrobber:self]);
timer_ =
@@ -59,7 +58,6 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
selector:@selector(animate:)
userInfo:nil
repeats:YES];
-#endif
}
return self;
}
@@ -69,6 +67,13 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
[super dealloc];
}
+- (void)removeFromSuperview {
+ [timer_ invalidate];
+ timer_ = nil;
+
+ [super removeFromSuperview];
+}
+
// Called when the TimerTarget gets tickled by our timer. Increment the frame
// counter and mark as needing display.
- (void)animate {