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 #include "chrome/browser/views/importing_progress_view.h" | 5 #include "chrome/browser/views/importing_progress_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "grit/chromium_strings.h" | 8 #include "grit/chromium_strings.h" |
9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
10 #include "grit/locale_settings.h" | 10 #include "grit/locale_settings.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 Profile* target_profile, | 296 Profile* target_profile, |
297 ImportObserver* observer, | 297 ImportObserver* observer, |
298 bool first_run) { | 298 bool first_run) { |
299 DCHECK(items != 0); | 299 DCHECK(items != 0); |
300 ImportingProgressView* v = new ImportingProgressView( | 300 ImportingProgressView* v = new ImportingProgressView( |
301 source_profile.description, items, coordinator, observer, parent_window, | 301 source_profile.description, items, coordinator, observer, parent_window, |
302 source_profile.browser_type == importer::BOOKMARKS_HTML); | 302 source_profile.browser_type == importer::BOOKMARKS_HTML); |
303 views::Window* window = | 303 views::Window* window = |
304 views::Window::CreateChromeWindow(parent_window, gfx::Rect(), v); | 304 views::Window::CreateChromeWindow(parent_window, gfx::Rect(), v); |
305 | 305 |
306 // In headless mode it means that we don't show the progress window, but it | |
307 // still need it to exist. No user interaction will be required. | |
308 if (!coordinator->is_headless()) | |
309 window->Show(); | |
310 | |
311 coordinator->StartImportSettings(source_profile, target_profile, items, | 306 coordinator->StartImportSettings(source_profile, target_profile, items, |
312 new ProfileWriter(target_profile), | 307 new ProfileWriter(target_profile), |
313 first_run); | 308 first_run); |
314 } | 309 } |
OLD | NEW |