| OLD | NEW |
| 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/views/importer_lock_view.h" | 5 #include "chrome/browser/views/importer_lock_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/browser/importer/importer.h" | 9 #include "chrome/browser/importer/importer.h" |
| 10 #include "grit/chromium_strings.h" | 10 #include "grit/chromium_strings.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 MessageBoxFlags::DialogButton button) const { | 47 MessageBoxFlags::DialogButton button) const { |
| 48 if (button == MessageBoxFlags::DIALOGBUTTON_OK) { | 48 if (button == MessageBoxFlags::DIALOGBUTTON_OK) { |
| 49 return l10n_util::GetString(IDS_IMPORTER_LOCK_OK); | 49 return l10n_util::GetString(IDS_IMPORTER_LOCK_OK); |
| 50 } else if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL) { | 50 } else if (button == MessageBoxFlags::DIALOGBUTTON_CANCEL) { |
| 51 return l10n_util::GetString(IDS_IMPORTER_LOCK_CANCEL); | 51 return l10n_util::GetString(IDS_IMPORTER_LOCK_CANCEL); |
| 52 } | 52 } |
| 53 return std::wstring(); | 53 return std::wstring(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool ImporterLockView::IsModal() const { | 56 bool ImporterLockView::IsModal() const { |
| 57 return true; | 57 return false; |
| 58 } | 58 } |
| 59 | 59 |
| 60 std::wstring ImporterLockView::GetWindowTitle() const { | 60 std::wstring ImporterLockView::GetWindowTitle() const { |
| 61 return l10n_util::GetString(IDS_IMPORTER_LOCK_TITLE); | 61 return l10n_util::GetString(IDS_IMPORTER_LOCK_TITLE); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool ImporterLockView::Accept() { | 64 bool ImporterLockView::Accept() { |
| 65 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( | 65 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( |
| 66 importer_host_, &ImporterHost::OnLockViewEnd, true)); | 66 importer_host_, &ImporterHost::OnLockViewEnd, true)); |
| 67 return true; | 67 return true; |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool ImporterLockView::Cancel() { | 70 bool ImporterLockView::Cancel() { |
| 71 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( | 71 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( |
| 72 importer_host_, &ImporterHost::OnLockViewEnd, false)); | 72 importer_host_, &ImporterHost::OnLockViewEnd, false)); |
| 73 return true; | 73 return true; |
| 74 } | 74 } |
| 75 | 75 |
| 76 views::View* ImporterLockView::GetContentsView() { | 76 views::View* ImporterLockView::GetContentsView() { |
| 77 return this; | 77 return this; |
| 78 } | 78 } |
| OLD | NEW |