summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-22 19:21:46 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-22 19:21:46 +0000
commit795df7ea50ed2c46284dec6eb6f7af413dd97f6b (patch)
treed248f609f45656193c73c1b9fa3742ef8c119fbc
parent48ab71e3048cd7ecc65e2486b4e7f6c28fabc538 (diff)
downloadchromium_src-795df7ea50ed2c46284dec6eb6f7af413dd97f6b.zip
chromium_src-795df7ea50ed2c46284dec6eb6f7af413dd97f6b.tar.gz
chromium_src-795df7ea50ed2c46284dec6eb6f7af413dd97f6b.tar.bz2
Correct logic that changes throbber states such that it will stay in the "wait" state for the correct period of time.
BUG=none TEST=none, code not yet enabled Review URL: http://codereview.chromium.org/141051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18933 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/cocoa/tab_strip_controller.mm16
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/cocoa/tab_strip_controller.mm b/chrome/browser/cocoa/tab_strip_controller.mm
index 90fced55..128ad7e 100644
--- a/chrome/browser/cocoa/tab_strip_controller.mm
+++ b/chrome/browser/cocoa/tab_strip_controller.mm
@@ -450,12 +450,16 @@ NSString* const kTabStripNumberOfTabsChanged = @"kTabStripNumberOfTabsChanged";
TabController* tabController = [tabArray_ objectAtIndex:index];
NSImage* image = nil;
- if (contents->waiting_for_response() && ![tabController waiting]) {
- image = throbberWaitingImage;
- [tabController setWaiting:YES];
- } else if (contents->is_loading() && ![tabController loading]) {
- image = throbberImage;
- [tabController setLoading:YES];
+ if (contents->waiting_for_response()) {
+ if (![tabController waiting]) {
+ image = throbberWaitingImage;
+ [tabController setWaiting:YES];
+ }
+ } else if (contents->is_loading()) {
+ if (![tabController loading]) {
+ image = throbberImage;
+ [tabController setLoading:YES];
+ }
}
if (image) {
NSRect frame = NSMakeRect(0, 0, 16, 16);