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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 290733004: Don't spin the loading indicator for in-page navigations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better? Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 1572
1573 TabLoadingState oldState = [tabController loadingState]; 1573 TabLoadingState oldState = [tabController loadingState];
1574 TabLoadingState newState = kTabDone; 1574 TabLoadingState newState = kTabDone;
1575 NSImage* throbberImage = nil; 1575 NSImage* throbberImage = nil;
1576 if (contents->IsCrashed()) { 1576 if (contents->IsCrashed()) {
1577 newState = kTabCrashed; 1577 newState = kTabCrashed;
1578 newHasIcon = true; 1578 newHasIcon = true;
1579 } else if (contents->IsWaitingForResponse()) { 1579 } else if (contents->IsWaitingForResponse()) {
1580 newState = kTabWaiting; 1580 newState = kTabWaiting;
1581 throbberImage = throbberWaitingImage; 1581 throbberImage = throbberWaitingImage;
1582 } else if (contents->IsLoading()) { 1582 } else if (contents->IsLoadingToDifferentDocument()) {
1583 newState = kTabLoading; 1583 newState = kTabLoading;
1584 throbberImage = throbberLoadingImage; 1584 throbberImage = throbberLoadingImage;
1585 } 1585 }
1586 1586
1587 if (oldState != newState) 1587 if (oldState != newState)
1588 [tabController setLoadingState:newState]; 1588 [tabController setLoadingState:newState];
1589 1589
1590 // While loading, this function is called repeatedly with the same state. 1590 // While loading, this function is called repeatedly with the same state.
1591 // To avoid expensive unnecessary view manipulation, only make changes when 1591 // To avoid expensive unnecessary view manipulation, only make changes when
1592 // the state is actually changing. When loading is complete (kTabDone), 1592 // the state is actually changing. When loading is complete (kTabDone),
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
2229 NSView* GetSheetParentViewForWebContents(WebContents* web_contents) { 2229 NSView* GetSheetParentViewForWebContents(WebContents* web_contents) {
2230 // View hierarchy of the contents view: 2230 // View hierarchy of the contents view:
2231 // NSView -- switchView, same for all tabs 2231 // NSView -- switchView, same for all tabs
2232 // +- NSView -- TabContentsController's view 2232 // +- NSView -- TabContentsController's view
2233 // +- TabContentsViewCocoa 2233 // +- TabContentsViewCocoa
2234 // 2234 //
2235 // Changing it? Do not forget to modify 2235 // Changing it? Do not forget to modify
2236 // -[TabStripController swapInTabAtIndex:] too. 2236 // -[TabStripController swapInTabAtIndex:] too.
2237 return [web_contents->GetNativeView() superview]; 2237 return [web_contents->GetNativeView() superview];
2238 } 2238 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698