Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1100 // Keep the new subviews in an array that gets replaced at the end. | 1100 // Keep the new subviews in an array that gets replaced at the end. |
| 1101 NSMutableArray* subviews = [NSMutableArray array]; | 1101 NSMutableArray* subviews = [NSMutableArray array]; |
| 1102 | 1102 |
| 1103 // Indicator that we have neither suggested nor installed services, | 1103 // Indicator that we have neither suggested nor installed services, |
| 1104 // and we're not in the wait stage any more either. | 1104 // and we're not in the wait stage any more either. |
| 1105 BOOL isEmpty = model_ && | 1105 BOOL isEmpty = model_ && |
| 1106 !model_->IsWaitingForSuggestions() && | 1106 !model_->IsWaitingForSuggestions() && |
| 1107 !model_->GetInstalledServiceCount() && | 1107 !model_->GetInstalledServiceCount() && |
| 1108 !model_->GetSuggestedExtensionCount(); | 1108 !model_->GetSuggestedExtensionCount(); |
| 1109 | 1109 |
| 1110 if (model_ && model_->IsWaitingForSuggestions()) { | 1110 if (model_) {// && model_->IsWaitingForSuggestions()) { |
|
falken
2012/10/05 05:40:47
I think we can't have commented out code, right?
Nico
2012/10/05 05:41:34
Whoops, that's unrelated anyway. Reverted this fil
| |
| 1111 if (!waitingView_.get()) | 1111 if (!waitingView_.get()) |
| 1112 waitingView_.reset([[WaitingView alloc] init]); | 1112 waitingView_.reset([[WaitingView alloc] init]); |
| 1113 [subviews addObject:waitingView_]; | 1113 [subviews addObject:waitingView_]; |
| 1114 offset += NSHeight([waitingView_ frame]); | 1114 offset += NSHeight([waitingView_ frame]); |
| 1115 } else if (isEmpty) { | 1115 } else if (isEmpty) { |
| 1116 scoped_nsobject<NSView> emptyView([self createEmptyView]); | 1116 scoped_nsobject<NSView> emptyView([self createEmptyView]); |
| 1117 [subviews addObject:emptyView]; | 1117 [subviews addObject:emptyView]; |
| 1118 offset += NSHeight([emptyView frame]); | 1118 offset += NSHeight([emptyView frame]); |
| 1119 } else if (contents_) { | 1119 } else if (contents_) { |
| 1120 offset += [self addAnotherServiceLinkToSubviews:subviews | 1120 offset += [self addAnotherServiceLinkToSubviews:subviews |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1181 - (void)stopThrobber { | 1181 - (void)stopThrobber { |
| 1182 [closeButton_ setEnabled:YES]; | 1182 [closeButton_ setEnabled:YES]; |
| 1183 [intentView_ stopThrobber]; | 1183 [intentView_ stopThrobber]; |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 - (void)closeSheet { | 1186 - (void)closeSheet { |
| 1187 [NSApp endSheet:[self window]]; | 1187 [NSApp endSheet:[self window]]; |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 @end // WebIntentPickerSheetController | 1190 @end // WebIntentPickerSheetController |
| OLD | NEW |