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

Side by Side Diff: chrome/browser/ui/cocoa/tabpose_window.mm

Issue 6046009: Move base/mac_util.h to base/mac and use the base::mac namespace.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « chrome/browser/ui/cocoa/tab_view.mm ('k') | chrome/browser/ui/cocoa/task_manager_mac.mm » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tabpose_window.h" 5 #import "chrome/browser/ui/cocoa/tabpose_window.h"
6 6
7 #import <QuartzCore/QuartzCore.h> 7 #import <QuartzCore/QuartzCore.h>
8 8
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/mac_util.h" 10 #include "base/mac/mac_util.h"
11 #include "base/mac/scoped_cftyperef.h" 11 #include "base/mac/scoped_cftyperef.h"
12 #include "base/scoped_callback_factory.h" 12 #include "base/scoped_callback_factory.h"
13 #include "base/sys_string_conversions.h" 13 #include "base/sys_string_conversions.h"
14 #include "chrome/app/chrome_command_ids.h" 14 #include "chrome/app/chrome_command_ids.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #import "chrome/browser/debugger/devtools_window.h" 16 #import "chrome/browser/debugger/devtools_window.h"
17 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
18 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/renderer_host/backing_store_mac.h" 19 #include "chrome/browser/renderer_host/backing_store_mac.h"
20 #include "chrome/browser/renderer_host/render_view_host.h" 20 #include "chrome/browser/renderer_host/render_view_host.h"
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 NSImage* nsFavicon = gfx::SkBitmapToNSImage(tile.favicon()); 1013 NSImage* nsFavicon = gfx::SkBitmapToNSImage(tile.favicon());
1014 // Either we don't have a valid favicon or there was some issue converting 1014 // Either we don't have a valid favicon or there was some issue converting
1015 // it from an SkBitmap. Either way, just show the default. 1015 // it from an SkBitmap. Either way, just show the default.
1016 if (!nsFavicon) { 1016 if (!nsFavicon) {
1017 NSImage* defaultFavIcon = 1017 NSImage* defaultFavIcon =
1018 ResourceBundle::GetSharedInstance().GetNativeImageNamed( 1018 ResourceBundle::GetSharedInstance().GetNativeImageNamed(
1019 IDR_DEFAULT_FAVICON); 1019 IDR_DEFAULT_FAVICON);
1020 nsFavicon = defaultFavIcon; 1020 nsFavicon = defaultFavIcon;
1021 } 1021 }
1022 base::mac::ScopedCFTypeRef<CGImageRef> favicon( 1022 base::mac::ScopedCFTypeRef<CGImageRef> favicon(
1023 mac_util::CopyNSImageToCGImage(nsFavicon)); 1023 base::mac::CopyNSImageToCGImage(nsFavicon));
1024 1024
1025 CALayer* faviconLayer = [CALayer layer]; 1025 CALayer* faviconLayer = [CALayer layer];
1026 if (showZoom) { 1026 if (showZoom) {
1027 AnimateCALayerFrameFromTo( 1027 AnimateCALayerFrameFromTo(
1028 faviconLayer, 1028 faviconLayer,
1029 tile.GetFaviconStartRectRelativeTo(tileSet_->selected_tile()), 1029 tile.GetFaviconStartRectRelativeTo(tileSet_->selected_tile()),
1030 tile.favicon_rect(), 1030 tile.favicon_rect(),
1031 interval, 1031 interval,
1032 nil); 1032 nil);
1033 AnimateCALayerOpacityFromTo(faviconLayer, 0.0, 1.0, interval); 1033 AnimateCALayerOpacityFromTo(faviconLayer, 0.0, 1.0, interval);
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 tile.set_tab_contents(contents->tab_contents()); 1545 tile.set_tab_contents(contents->tab_contents());
1546 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index]; 1546 ThumbnailLayer* thumbLayer = [allThumbnailLayers_ objectAtIndex:index];
1547 [thumbLayer setTabContents:contents->tab_contents()]; 1547 [thumbLayer setTabContents:contents->tab_contents()];
1548 } 1548 }
1549 1549
1550 - (void)tabStripModelDeleted { 1550 - (void)tabStripModelDeleted {
1551 [self close]; 1551 [self close];
1552 } 1552 }
1553 1553
1554 @end 1554 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_view.mm ('k') | chrome/browser/ui/cocoa/task_manager_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698