| OLD | NEW |
| 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 "chrome/browser/cocoa/import_progress_dialog.h" | 5 #import "chrome/browser/cocoa/import_progress_dialog.h" |
| 6 | 6 |
| 7 #include "app/l10n_util_mac.h" | 7 #include "app/l10n_util_mac.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/mac_util.h" | 9 #include "base/mac_util.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 @synthesize historyStatusText = history_status_text_; | 47 @synthesize historyStatusText = history_status_text_; |
| 48 | 48 |
| 49 @synthesize favoritesImportEnabled = favorites_import_enabled_; | 49 @synthesize favoritesImportEnabled = favorites_import_enabled_; |
| 50 @synthesize searchImportEnabled = search_import_enabled_; | 50 @synthesize searchImportEnabled = search_import_enabled_; |
| 51 @synthesize passwordImportEnabled = password_import_enabled_; | 51 @synthesize passwordImportEnabled = password_import_enabled_; |
| 52 @synthesize historyImportEnabled = history_import_enabled_; | 52 @synthesize historyImportEnabled = history_import_enabled_; |
| 53 | 53 |
| 54 - (id)initWithImporterHost:(ImporterHost*)host | 54 - (id)initWithImporterHost:(ImporterHost*)host |
| 55 browserName:(string16)browserName | 55 browserName:(string16)browserName |
| 56 observer:(ImportObserver*)observer | 56 observer:(ImportObserver*)observer |
| 57 itemsEnabled:(int16)items; { | 57 itemsEnabled:(int16)items { |
| 58 NSString* nib_path = | 58 NSString* nib_path = |
| 59 [mac_util::MainAppBundle() pathForResource:@"ImportProgressDialog" | 59 [mac_util::MainAppBundle() pathForResource:@"ImportProgressDialog" |
| 60 ofType:@"nib"]; | 60 ofType:@"nib"]; |
| 61 self = [super initWithWindowNibPath:nib_path owner:self]; | 61 self = [super initWithWindowNibPath:nib_path owner:self]; |
| 62 if (self != nil) { | 62 if (self != nil) { |
| 63 importer_host_ = host; | 63 importer_host_ = host; |
| 64 observer_ = observer; | 64 observer_ = observer; |
| 65 import_host_observer_bridge_.reset(new ImporterObserverBridge(self)); | 65 import_host_observer_bridge_.reset(new ImporterObserverBridge(self)); |
| 66 importer_host_->SetObserver(import_host_observer_bridge_.get()); | 66 importer_host_->SetObserver(import_host_observer_bridge_.get()); |
| 67 | 67 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 NSWindow* progress_window = [progress_dialog_ window]; | 182 NSWindow* progress_window = [progress_dialog_ window]; |
| 183 NSModalSession session = [NSApp beginModalSessionForWindow:progress_window]; | 183 NSModalSession session = [NSApp beginModalSessionForWindow:progress_window]; |
| 184 [progress_dialog_ showWindow:nil]; | 184 [progress_dialog_ showWindow:nil]; |
| 185 while (true) { | 185 while (true) { |
| 186 if ([NSApp runModalSession:session] != NSRunContinuesResponse) | 186 if ([NSApp runModalSession:session] != NSRunContinuesResponse) |
| 187 break; | 187 break; |
| 188 MessageLoop::current()->RunAllPending(); | 188 MessageLoop::current()->RunAllPending(); |
| 189 } | 189 } |
| 190 [NSApp endModalSession:session]; | 190 [NSApp endModalSession:session]; |
| 191 } | 191 } |
| OLD | NEW |