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

Side by Side Diff: chrome/browser/ui/cocoa/notifications/balloon_controller.mm

Issue 11691003: mac: Replace notification wrench pdf with a png (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: notest Created 7 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/app/theme/balloon_wrench.pdf ('k') | chrome/chrome_dll_bundle.gypi » ('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 #include "chrome/browser/ui/cocoa/notifications/balloon_controller.h" 5 #include "chrome/browser/ui/cocoa/notifications/balloon_controller.h"
6 6
7 #include "base/mac/bundle_locations.h" 7 #include "base/mac/bundle_locations.h"
8 #include "base/mac/mac_util.h" 8 #include "base/mac/mac_util.h"
9 #import "base/memory/scoped_nsobject.h" 9 #import "base/memory/scoped_nsobject.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 menuController_.reset([[MenuController alloc] initWithModel:menuModel_.get() 54 menuController_.reset([[MenuController alloc] initWithModel:menuModel_.get()
55 useWithPopUpButtonCell:NO]); 55 useWithPopUpButtonCell:NO]);
56 } 56 }
57 return self; 57 return self;
58 } 58 }
59 59
60 - (void)awakeFromNib { 60 - (void)awakeFromNib {
61 DCHECK([self window]); 61 DCHECK([self window]);
62 DCHECK_EQ(self, [[self window] delegate]); 62 DCHECK_EQ(self, [[self window] delegate]);
63 63
64 NSImage* image = gfx::GetCachedImageWithName(@"balloon_wrench.pdf"); 64 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
65 [optionsButton_ setDefaultImage:image]; 65 [optionsButton_ setDefaultImage:
66 [optionsButton_ setDefaultOpacity:0.6]; 66 rb.GetNativeImageNamed(IDR_BALLOON_WRENCH).ToNSImage()];
67 [optionsButton_ setHoverImage:image]; 67 [optionsButton_ setDefaultOpacity:1.0];
68 [optionsButton_ setHoverOpacity:0.9]; 68 [optionsButton_ setHoverImage:
69 [optionsButton_ setPressedImage:image]; 69 rb.GetNativeImageNamed(IDR_BALLOON_WRENCH_H).ToNSImage()];
70 [optionsButton_ setHoverOpacity:1.0];
71 [optionsButton_ setPressedImage:
72 rb.GetNativeImageNamed(IDR_BALLOON_WRENCH_P).ToNSImage()];
70 [optionsButton_ setPressedOpacity:1.0]; 73 [optionsButton_ setPressedOpacity:1.0];
71 [[optionsButton_ cell] setHighlightsBy:NSNoCellMask]; 74 [[optionsButton_ cell] setHighlightsBy:NSNoCellMask];
72 75
73 NSString* sourceLabelText = l10n_util::GetNSStringF( 76 NSString* sourceLabelText = l10n_util::GetNSStringF(
74 IDS_NOTIFICATION_BALLOON_SOURCE_LABEL, 77 IDS_NOTIFICATION_BALLOON_SOURCE_LABEL,
75 balloon_->notification().display_source()); 78 balloon_->notification().display_source());
76 [originLabel_ setStringValue:sourceLabelText]; 79 [originLabel_ setStringValue:sourceLabelText];
77 80
78 // This condition is false in unit tests which have no RVH. 81 // This condition is false in unit tests which have no RVH.
79 if (htmlContents_.get()) { 82 if (htmlContents_.get()) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 htmlContents_.reset(new BalloonViewHost(balloon_)); 220 htmlContents_.reset(new BalloonViewHost(balloon_));
218 htmlContents_->Init(); 221 htmlContents_->Init();
219 } 222 }
220 223
221 // NSWindowDelegate notification. 224 // NSWindowDelegate notification.
222 - (void)windowWillClose:(NSNotification*)notif { 225 - (void)windowWillClose:(NSNotification*)notif {
223 [self autorelease]; 226 [self autorelease];
224 } 227 }
225 228
226 @end 229 @end
OLDNEW
« no previous file with comments | « chrome/app/theme/balloon_wrench.pdf ('k') | chrome/chrome_dll_bundle.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698