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

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

Issue 10417027: Restrict throbber messages to SingleSuggestionView objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extraneous logging. Created 8 years, 7 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 | « no previous file | no next file » | 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 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h" 5 #import "chrome/browser/ui/cocoa/web_intent_sheet_controller.h"
6 6
7 #include "base/memory/scoped_nsobject.h" 7 #include "base/memory/scoped_nsobject.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 [suggestionLabel_ setStringValue:base::SysUTF16ToNSString(labelText)]; 403 [suggestionLabel_ setStringValue:base::SysUTF16ToNSString(labelText)];
404 textFrame.size.height += 404 textFrame.size.height +=
405 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField: 405 [GTMUILocalizerAndLayoutTweaker sizeToFitFixedWidthTextField:
406 suggestionLabel_]; 406 suggestionLabel_];
407 [suggestionLabel_ setFrame: textFrame]; 407 [suggestionLabel_ setFrame: textFrame];
408 } 408 }
409 } 409 }
410 410
411 - (void)startThrobberForRow:(NSInteger)index { 411 - (void)startThrobberForRow:(NSInteger)index {
412 for (SingleSuggestionView* row in [self subviews]) { 412 for (SingleSuggestionView* row in [self subviews]) {
413 [row setEnabled:NO]; 413 if ([row isMemberOfClass:[SingleSuggestionView class]]) {
414 if ([row tag] == index) 414 [row setEnabled:NO];
415 [row startThrobber]; 415 if ([row tag] == index) {
416 [row startThrobber];
417 }
418 }
416 } 419 }
417 } 420 }
418 421
419 - (void)stopThrobber { 422 - (void)stopThrobber {
420 for (SingleSuggestionView* row in [self subviews]) { 423 for (SingleSuggestionView* row in [self subviews]) {
421 [row stopThrobber]; 424 if ([row isMemberOfClass:[SingleSuggestionView class]]) {
422 [row setEnabled:YES]; 425 [row stopThrobber];
426 [row setEnabled:YES];
427 }
423 } 428 }
424 } 429 }
425 430
426 - (IBAction)installExtension:(id)sender { 431 - (IBAction)installExtension:(id)sender {
427 [controller_ installExtension:sender]; 432 [controller_ installExtension:sender];
428 } 433 }
429 434
430 435
431 - (CGFloat)addStackedView:(NSView*)view 436 - (CGFloat)addStackedView:(NSView*)view
432 toSubviews:(NSMutableArray*)subviews 437 toSubviews:(NSMutableArray*)subviews
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 - (void)stopThrobber { 746 - (void)stopThrobber {
742 [closeButton_ setEnabled:YES]; 747 [closeButton_ setEnabled:YES];
743 [self setIntentButtonsEnabled:YES]; 748 [self setIntentButtonsEnabled:YES];
744 [suggestionView_ stopThrobber]; 749 [suggestionView_ stopThrobber];
745 } 750 }
746 751
747 - (void)closeSheet { 752 - (void)closeSheet {
748 [NSApp endSheet:[self window]]; 753 [NSApp endSheet:[self window]];
749 } 754 }
750 @end // WebIntentPickerSheetController 755 @end // WebIntentPickerSheetController
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698