| 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.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/l10n_util_mac.h" | 8 #include "app/l10n_util_mac.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/mac_util.h" | 10 #include "base/mac_util.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 [self closeDialog]; | 147 [self closeDialog]; |
| 148 [self release]; | 148 [self release]; |
| 149 | 149 |
| 150 // Break out of modal event loop. | 150 // Break out of modal event loop. |
| 151 [NSApp stopModal]; | 151 [NSApp stopModal]; |
| 152 } | 152 } |
| 153 | 153 |
| 154 @end | 154 @end |
| 155 | 155 |
| 156 void StartImportingWithUI(gfx::NativeWindow parent_window, | 156 void StartImportingWithUI(gfx::NativeWindow parent_window, |
| 157 int16 items, | 157 uint16 items, |
| 158 ImporterHost* coordinator, | 158 ImporterHost* coordinator, |
| 159 const importer::ProfileInfo& source_profile, | 159 const importer::ProfileInfo& source_profile, |
| 160 Profile* target_profile, | 160 Profile* target_profile, |
| 161 ImportObserver* observer, | 161 ImportObserver* observer, |
| 162 bool first_run) { | 162 bool first_run) { |
| 163 DCHECK(items != 0); | 163 DCHECK(items != 0); |
| 164 | 164 |
| 165 // Retrieve name of browser we're importing from and do a little dance to | 165 // Retrieve name of browser we're importing from and do a little dance to |
| 166 // convert wstring -> string16. | 166 // convert wstring -> string16. |
| 167 string16 import_browser_name = WideToUTF16Hack(source_profile.description); | 167 string16 import_browser_name = WideToUTF16Hack(source_profile.description); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 183 NSWindow* progress_window = [progress_dialog_ window]; | 183 NSWindow* progress_window = [progress_dialog_ window]; |
| 184 NSModalSession session = [NSApp beginModalSessionForWindow:progress_window]; | 184 NSModalSession session = [NSApp beginModalSessionForWindow:progress_window]; |
| 185 [progress_dialog_ showWindow:nil]; | 185 [progress_dialog_ showWindow:nil]; |
| 186 while (true) { | 186 while (true) { |
| 187 if ([NSApp runModalSession:session] != NSRunContinuesResponse) | 187 if ([NSApp runModalSession:session] != NSRunContinuesResponse) |
| 188 break; | 188 break; |
| 189 MessageLoop::current()->RunAllPending(); | 189 MessageLoop::current()->RunAllPending(); |
| 190 } | 190 } |
| 191 [NSApp endModalSession:session]; | 191 [NSApp endModalSession:session]; |
| 192 } | 192 } |
| OLD | NEW |