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/importer/importer.h" | 5 #include "chrome/browser/importer/importer.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/thread.h" | 8 #include "base/thread.h" |
9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 DCHECK(type == NotificationType::TEMPLATE_URL_MODEL_LOADED); | 116 DCHECK(type == NotificationType::TEMPLATE_URL_MODEL_LOADED); |
117 registrar_.RemoveAll(); | 117 registrar_.RemoveAll(); |
118 InvokeTaskIfDone(); | 118 InvokeTaskIfDone(); |
119 } | 119 } |
120 | 120 |
121 void ImporterHost::ShowWarningDialog() { | 121 void ImporterHost::ShowWarningDialog() { |
122 if (headless_) { | 122 if (headless_) { |
123 OnLockViewEnd(false); | 123 OnLockViewEnd(false); |
124 } else { | 124 } else { |
125 #if defined(OS_WIN) | 125 #if defined(OS_WIN) |
126 views::Window::CreateChromeWindow(GetActiveWindow(), gfx::Rect(), | 126 views::Window::CreateChromeWindow(NULL, gfx::Rect(), |
127 new ImporterLockView(this))->Show(); | 127 new ImporterLockView(this))->Show(); |
128 #elif defined(TOOLKIT_USES_GTK) | 128 #elif defined(TOOLKIT_USES_GTK) |
129 ImportLockDialogGtk::Show(parent_window_, this); | 129 ImportLockDialogGtk::Show(parent_window_, this); |
130 #else | 130 #else |
131 ImportLockDialogCocoa::ShowWarning(this); | 131 ImportLockDialogCocoa::ShowWarning(this); |
132 #endif | 132 #endif |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 void ImporterHost::OnLockViewEnd(bool is_continue) { | 136 void ImporterHost::OnLockViewEnd(bool is_continue) { |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 template_url_vec.reserve(template_urls.size()); | 586 template_url_vec.reserve(template_urls.size()); |
587 std::vector<TemplateURL>::const_iterator iter; | 587 std::vector<TemplateURL>::const_iterator iter; |
588 for (iter = template_urls.begin(); | 588 for (iter = template_urls.begin(); |
589 iter != template_urls.end(); | 589 iter != template_urls.end(); |
590 ++iter) { | 590 ++iter) { |
591 template_url_vec.push_back(new TemplateURL(*iter)); | 591 template_url_vec.push_back(new TemplateURL(*iter)); |
592 } | 592 } |
593 bridge_->SetKeywords(template_url_vec, default_keyword_index, | 593 bridge_->SetKeywords(template_url_vec, default_keyword_index, |
594 unique_on_host_and_path); | 594 unique_on_host_and_path); |
595 } | 595 } |
OLD | NEW |