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

Unified Diff: chrome/browser/ui/cocoa/web_intent_bubble_controller.mm

Issue 9148032: [Web Intents] Refactor picker to use WebIntentPickerModel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: groby's fix Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/web_intent_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/web_intent_bubble_controller.mm b/chrome/browser/ui/cocoa/web_intent_bubble_controller.mm
index 4c957cabdc6476635007d29b266ed659b7981962..488165dda06ce00656db2f8778fb6bff4d7150a1 100644
--- a/chrome/browser/ui/cocoa/web_intent_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/web_intent_bubble_controller.mm
@@ -75,9 +75,6 @@ const CGFloat kTextWidth = kWindowWidth - (kImageSize + kImageSpacing +
NSPointerFunctionsStrongMemory |
NSPointerFunctionsObjectPersonality]);
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- defaultIcon_.reset([rb.GetNativeImageNamed(IDR_DEFAULT_FAVICON) retain]);
-
[[self bubble] setArrowLocation:info_bubble::kTopLeft];
[self performLayout];
[self showWindow:nil];
@@ -241,7 +238,7 @@ const CGFloat kTextWidth = kWindowWidth - (kImageSize + kImageSpacing +
scoped_nsobject<NSButtonCell> cell([[NSButtonCell alloc] init]);
NSImage* image = static_cast<NSImage*>([iconImages_ pointerAtIndex:i]);
if (!image)
- image = defaultIcon_;
+ continue;
// Set cell styles so it acts as image button.
[cell setBordered:NO];
@@ -254,7 +251,7 @@ const CGFloat kTextWidth = kWindowWidth - (kImageSize + kImageSpacing +
[cell setEnabled:YES];
[matrix putCell:cell atRow:(i / iconsPerRow) column:(i % iconsPerRow)];
- if (serviceURLs_ && [serviceURLs_ count] >= i)
+ if (serviceURLs_ && i < [serviceURLs_ count])
[matrix setToolTip:[serviceURLs_ objectAtIndex:i] forCell:cell];
}

Powered by Google App Engine
This is Rietveld 408576698