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

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

Issue 174883003: mac: Disable CoreAnimation throbbers for now, while I investigate the performance regressions. (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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/throbber_view.h » ('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 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 } else if (newState == kTabCrashed) { 1604 } else if (newState == kTabCrashed) {
1605 NSImage* oldImage = [[self iconImageViewForContents:contents] image]; 1605 NSImage* oldImage = [[self iconImageViewForContents:contents] image];
1606 NSRect frame = 1606 NSRect frame =
1607 NSMakeRect(0, 0, kIconWidthAndHeight, kIconWidthAndHeight); 1607 NSMakeRect(0, 0, kIconWidthAndHeight, kIconWidthAndHeight);
1608 iconView = [ThrobberView toastThrobberViewWithFrame:frame 1608 iconView = [ThrobberView toastThrobberViewWithFrame:frame
1609 beforeImage:oldImage 1609 beforeImage:oldImage
1610 afterImage:sadFaviconImage]; 1610 afterImage:sadFaviconImage];
1611 [[tabController mediaIndicatorView] 1611 [[tabController mediaIndicatorView]
1612 updateIndicator:TAB_MEDIA_STATE_NONE]; 1612 updateIndicator:TAB_MEDIA_STATE_NONE];
1613 } else { 1613 } else {
1614 iconView = 1614 NSRect frame =
1615 [[[SpriteView alloc] initWithImage:throbberImage] autorelease]; 1615 NSMakeRect(0, 0, kIconWidthAndHeight, kIconWidthAndHeight);
1616 iconView = [ThrobberView filmstripThrobberViewWithFrame:frame
1617 image:throbberImage];
1616 } 1618 }
1617 } 1619 }
1618 1620
1619 [tabController setIconView:iconView]; 1621 [tabController setIconView:iconView];
1620 if (iconView) { 1622 if (iconView) {
1621 // See the comment above kTabOverlap for why these DCHECKs exist. 1623 // See the comment above kTabOverlap for why these DCHECKs exist.
1622 DCHECK_GE(NSMinX([iconView frame]), kTabOverlap); 1624 DCHECK_GE(NSMinX([iconView frame]), kTabOverlap);
1623 // TODO(thakis): Ideally, this would be true too, but it's not true in 1625 // TODO(thakis): Ideally, this would be true too, but it's not true in
1624 // some tests. 1626 // some tests.
1625 //DCHECK_LE(NSMaxX([iconView frame]), 1627 //DCHECK_LE(NSMaxX([iconView frame]),
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 NSView* GetSheetParentViewForWebContents(WebContents* web_contents) { 2229 NSView* GetSheetParentViewForWebContents(WebContents* web_contents) {
2228 // View hierarchy of the contents view: 2230 // View hierarchy of the contents view:
2229 // NSView -- switchView, same for all tabs 2231 // NSView -- switchView, same for all tabs
2230 // +- NSView -- TabContentsController's view 2232 // +- NSView -- TabContentsController's view
2231 // +- TabContentsViewCocoa 2233 // +- TabContentsViewCocoa
2232 // 2234 //
2233 // Changing it? Do not forget to modify 2235 // Changing it? Do not forget to modify
2234 // -[TabStripController swapInTabAtIndex:] too. 2236 // -[TabStripController swapInTabAtIndex:] too.
2235 return [web_contents->GetView()->GetNativeView() superview]; 2237 return [web_contents->GetView()->GetNativeView() superview];
2236 } 2238 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/throbber_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698