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

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

Issue 1508893003: Use proper namespace in skia/ext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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
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 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 extensions::TabHelper* extensions_tab_helper = 1549 extensions::TabHelper* extensions_tab_helper =
1550 extensions::TabHelper::FromWebContents(contents); 1550 extensions::TabHelper::FromWebContents(contents);
1551 BOOL isApp = extensions_tab_helper->is_app(); 1551 BOOL isApp = extensions_tab_helper->is_app();
1552 NSImage* image = nil; 1552 NSImage* image = nil;
1553 // Favicons come from the renderer, and the renderer draws everything in the 1553 // Favicons come from the renderer, and the renderer draws everything in the
1554 // system color space. 1554 // system color space.
1555 CGColorSpaceRef colorSpace = base::mac::GetSystemColorSpace(); 1555 CGColorSpaceRef colorSpace = base::mac::GetSystemColorSpace();
1556 if (isApp) { 1556 if (isApp) {
1557 SkBitmap* icon = extensions_tab_helper->GetExtensionAppIcon(); 1557 SkBitmap* icon = extensions_tab_helper->GetExtensionAppIcon();
1558 if (icon) 1558 if (icon)
1559 image = gfx::SkBitmapToNSImageWithColorSpace(*icon, colorSpace); 1559 image = skia::SkBitmapToNSImageWithColorSpace(*icon, colorSpace);
1560 } else { 1560 } else {
1561 image = mac::FaviconForWebContents(contents); 1561 image = mac::FaviconForWebContents(contents);
1562 } 1562 }
1563 1563
1564 // Either we don't have a valid favicon or there was some issue converting it 1564 // Either we don't have a valid favicon or there was some issue converting it
1565 // from an SkBitmap. Either way, just show the default. 1565 // from an SkBitmap. Either way, just show the default.
1566 if (!image) 1566 if (!image)
1567 image = defaultFavicon_.get(); 1567 image = defaultFavicon_.get();
1568 1568
1569 return image; 1569 return image;
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
2390 forButtonState:image_button_cell::kHoverStateBackground]; 2390 forButtonState:image_button_cell::kHoverStateBackground];
2391 } else { 2391 } else {
2392 [[newTabButton_ cell] setImage:nil 2392 [[newTabButton_ cell] setImage:nil
2393 forButtonState:image_button_cell::kDefaultStateBackground]; 2393 forButtonState:image_button_cell::kDefaultStateBackground];
2394 [[newTabButton_ cell] setImage:nil 2394 [[newTabButton_ cell] setImage:nil
2395 forButtonState:image_button_cell::kHoverStateBackground]; 2395 forButtonState:image_button_cell::kHoverStateBackground];
2396 } 2396 }
2397 } 2397 }
2398 2398
2399 @end 2399 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/status_icons/status_icon_mac.mm ('k') | components/suggestions/image_encoder_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698