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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm

Issue 5961007: Move nsimage_cache from base to app/mac. Use the app::mac namespace. Update c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
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 "browser_actions_controller.h" 5 #import "browser_actions_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <string> 8 #include <string>
9 9
10 #include "base/nsimage_cache_mac.h" 10 #include "app/mac/nsimage_cache.h"
11 #include "base/sys_string_conversions.h" 11 #include "base/sys_string_conversions.h"
12 #include "chrome/browser/extensions/extension_browser_event_router.h" 12 #include "chrome/browser/extensions/extension_browser_event_router.h"
13 #include "chrome/browser/extensions/extension_host.h" 13 #include "chrome/browser/extensions/extension_host.h"
14 #include "chrome/browser/extensions/extension_toolbar_model.h" 14 #include "chrome/browser/extensions/extension_toolbar_model.h"
15 #include "chrome/browser/extensions/extension_service.h" 15 #include "chrome/browser/extensions/extension_service.h"
16 #include "chrome/browser/prefs/pref_service.h" 16 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/tab_contents/tab_contents.h" 18 #include "chrome/browser/tab_contents/tab_contents.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
20 #import "chrome/browser/ui/cocoa/extensions/browser_action_button.h" 20 #import "chrome/browser/ui/cocoa/extensions/browser_action_button.h"
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 - (void)setChevronHidden:(BOOL)hidden 770 - (void)setChevronHidden:(BOOL)hidden
771 inFrame:(NSRect)frame 771 inFrame:(NSRect)frame
772 animate:(BOOL)animate { 772 animate:(BOOL)animate {
773 if (hidden == [self chevronIsHidden]) 773 if (hidden == [self chevronIsHidden])
774 return; 774 return;
775 775
776 if (!chevronMenuButton_.get()) { 776 if (!chevronMenuButton_.get()) {
777 chevronMenuButton_.reset([[ChevronMenuButton alloc] init]); 777 chevronMenuButton_.reset([[ChevronMenuButton alloc] init]);
778 [chevronMenuButton_ setBordered:NO]; 778 [chevronMenuButton_ setBordered:NO];
779 [chevronMenuButton_ setShowsBorderOnlyWhileMouseInside:YES]; 779 [chevronMenuButton_ setShowsBorderOnlyWhileMouseInside:YES];
780 NSImage* chevronImage = nsimage_cache::ImageNamed(kOverflowChevronsName); 780 NSImage* chevronImage =
781 app::mac::GetCachedImageWithName(kOverflowChevronsName);
781 [chevronMenuButton_ setImage:chevronImage]; 782 [chevronMenuButton_ setImage:chevronImage];
782 [containerView_ addSubview:chevronMenuButton_]; 783 [containerView_ addSubview:chevronMenuButton_];
783 } 784 }
784 785
785 if (!hidden) 786 if (!hidden)
786 [self updateOverflowMenu]; 787 [self updateOverflowMenu];
787 788
788 [self updateChevronPositionInFrame:frame]; 789 [self updateChevronPositionInFrame:frame];
789 790
790 // Stop any running animation. 791 // Stop any running animation.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 if (profile_->IsOffTheRecord()) 857 if (profile_->IsOffTheRecord())
857 index = toolbarModel_->IncognitoIndexToOriginal(index); 858 index = toolbarModel_->IncognitoIndexToOriginal(index);
858 if (index < toolbarModel_->size()) { 859 if (index < toolbarModel_->size()) {
859 const Extension* extension = toolbarModel_->GetExtensionByIndex(index); 860 const Extension* extension = toolbarModel_->GetExtensionByIndex(index);
860 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; 861 return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())];
861 } 862 }
862 return nil; 863 return nil;
863 } 864 }
864 865
865 @end 866 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698