summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 21:25:28 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-21 21:25:28 +0000
commit2537ef4f42cf26537cd7ac413f6d0ddaff9d5520 (patch)
treea52944127cc99378d965d65a8b775423fbcca06d /chrome/browser/cocoa
parent186812f1565d52b12aff9b99a76e79e170f35412 (diff)
downloadchromium_src-2537ef4f42cf26537cd7ac413f6d0ddaff9d5520.zip
chromium_src-2537ef4f42cf26537cd7ac413f6d0ddaff9d5520.tar.gz
chromium_src-2537ef4f42cf26537cd7ac413f6d0ddaff9d5520.tar.bz2
More tests for tab_cold. commenting out drawRect entirely.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16658 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r--chrome/browser/cocoa/tab_strip_controller.mm11
-rw-r--r--chrome/browser/cocoa/throbber_view.mm6
2 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm
index eb293a5..ab5d82d 100644
--- a/chrome/browser/cocoa/tab_strip_controller.mm
+++ b/chrome/browser/cocoa/tab_strip_controller.mm
@@ -379,7 +379,7 @@
if (!loading)
[self setTabTitle:[tabArray_ objectAtIndex:index] withContents:contents];
-#if 0
+#if 1
// TODO(pinkerton): Enabling this slowed down the tab_cold startup test by
// close to 5 seconds. Turning it off to see if the bot returns to normal.
// Update the current loading state, replacing the icon with a throbber, or
@@ -402,9 +402,18 @@
}
if (image) {
NSRect frame = NSMakeRect(0, 0, 16, 16);
+#if 0
+ NSProgressIndicator* p =
+ [[[NSProgressIndicator alloc] initWithFrame:frame] autorelease];
+ [p setIndeterminate:YES];
+ [p setStyle:NSProgressIndicatorSpinningStyle];
+ [p startAnimation:self];
+ [tabController setIconView:p];
+#else
ThrobberView* throbber =
[[[ThrobberView alloc] initWithFrame:frame image:image] autorelease];
[tabController setIconView:throbber];
+#endif
}
else if (!contents->is_loading()) {
// Set everything back to normal, we're done loading.
diff --git a/chrome/browser/cocoa/throbber_view.mm b/chrome/browser/cocoa/throbber_view.mm
index cafdcf8..b93f45d 100644
--- a/chrome/browser/cocoa/throbber_view.mm
+++ b/chrome/browser/cocoa/throbber_view.mm
@@ -78,6 +78,10 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
[super dealloc];
}
+- (BOOL)isOpaque {
+ return YES;
+}
+
- (void)removeFromSuperview {
[timer_ invalidate];
timer_ = nil;
@@ -94,6 +98,7 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
// Overridden to draw the appropriate frame in the image strip.
- (void)drawRect:(NSRect)rect {
+#if 0
float imageDimension = [image_ extent].size.height;
float xOffset = animationFrame_ * imageDimension;
NSRect sourceImageRect =
@@ -102,6 +107,7 @@ const float kAnimationIntervalSeconds = 0.03; // 30ms, same as windows
fromRect:sourceImageRect
operation:NSCompositeSourceOver
fraction:1.0];
+#endif
}
@end