Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: chrome/browser/importer/importer.cc

Issue 131080: Linux: make import warning dialog modal. (Closed)
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/importer/importer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "app/gfx/favicon_size.h" 10 #include "app/gfx/favicon_size.h"
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 394
395 // ImporterHost. 395 // ImporterHost.
396 396
397 ImporterHost::ImporterHost() 397 ImporterHost::ImporterHost()
398 : observer_(NULL), 398 : observer_(NULL),
399 task_(NULL), 399 task_(NULL),
400 importer_(NULL), 400 importer_(NULL),
401 file_loop_(g_browser_process->file_thread()->message_loop()), 401 file_loop_(g_browser_process->file_thread()->message_loop()),
402 waiting_for_bookmarkbar_model_(false), 402 waiting_for_bookmarkbar_model_(false),
403 is_source_readable_(true), 403 is_source_readable_(true),
404 headless_(false) { 404 headless_(false),
405 parent_window_(NULL) {
405 DetectSourceProfiles(); 406 DetectSourceProfiles();
406 } 407 }
407 408
408 ImporterHost::ImporterHost(MessageLoop* file_loop) 409 ImporterHost::ImporterHost(MessageLoop* file_loop)
409 : observer_(NULL), 410 : observer_(NULL),
410 task_(NULL), 411 task_(NULL),
411 importer_(NULL), 412 importer_(NULL),
412 file_loop_(file_loop), 413 file_loop_(file_loop),
413 waiting_for_bookmarkbar_model_(false), 414 waiting_for_bookmarkbar_model_(false),
414 is_source_readable_(true), 415 is_source_readable_(true),
415 headless_(false) { 416 headless_(false),
417 parent_window_(NULL) {
416 DetectSourceProfiles(); 418 DetectSourceProfiles();
417 } 419 }
418 420
419 ImporterHost::~ImporterHost() { 421 ImporterHost::~ImporterHost() {
420 STLDeleteContainerPointers(source_profiles_.begin(), source_profiles_.end()); 422 STLDeleteContainerPointers(source_profiles_.begin(), source_profiles_.end());
421 if (NULL != importer_) 423 if (NULL != importer_)
422 importer_->Release(); 424 importer_->Release();
423 } 425 }
424 426
425 void ImporterHost::Loaded(BookmarkModel* model) { 427 void ImporterHost::Loaded(BookmarkModel* model) {
(...skipping 11 matching lines...) Expand all
437 } 439 }
438 440
439 void ImporterHost::ShowWarningDialog() { 441 void ImporterHost::ShowWarningDialog() {
440 if (headless_) { 442 if (headless_) {
441 OnLockViewEnd(false); 443 OnLockViewEnd(false);
442 } else { 444 } else {
443 #if defined(OS_WIN) 445 #if defined(OS_WIN)
444 views::Window::CreateChromeWindow(GetActiveWindow(), gfx::Rect(), 446 views::Window::CreateChromeWindow(GetActiveWindow(), gfx::Rect(),
445 new ImporterLockView(this))->Show(); 447 new ImporterLockView(this))->Show();
446 #elif defined(OS_LINUX) 448 #elif defined(OS_LINUX)
447 ImportLockDialogGtk::Show(NULL, this); 449 ImportLockDialogGtk::Show(parent_window_, this);
448 #else 450 #else
449 // TODO(port): Need CreateChromeWindow. 451 // TODO(port): Need CreateChromeWindow.
450 NOTIMPLEMENTED(); 452 NOTIMPLEMENTED();
451 #endif 453 #endif
452 } 454 }
453 } 455 }
454 456
455 void ImporterHost::OnLockViewEnd(bool is_continue) { 457 void ImporterHost::OnLockViewEnd(bool is_continue) {
456 if (is_continue) { 458 if (is_continue) {
457 // User chose to continue, then we check the lock again to make 459 // User chose to continue, then we check the lock again to make
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 ProfileInfo* google_toolbar = new ProfileInfo(); 757 ProfileInfo* google_toolbar = new ProfileInfo();
756 google_toolbar->browser_type = GOOGLE_TOOLBAR5; 758 google_toolbar->browser_type = GOOGLE_TOOLBAR5;
757 google_toolbar->description = l10n_util::GetString( 759 google_toolbar->description = l10n_util::GetString(
758 IDS_IMPORT_FROM_GOOGLE_TOOLBAR); 760 IDS_IMPORT_FROM_GOOGLE_TOOLBAR);
759 google_toolbar->source_path.clear(); 761 google_toolbar->source_path.clear();
760 google_toolbar->app_path.clear(); 762 google_toolbar->app_path.clear();
761 google_toolbar->services_supported = FAVORITES; 763 google_toolbar->services_supported = FAVORITES;
762 source_profiles_.push_back(google_toolbar); 764 source_profiles_.push_back(google_toolbar);
763 } 765 }
764 } 766 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/importer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698