OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/importer_lock_view.h" | 5 #include "chrome/browser/ui/views/importer_lock_view.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.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" |
11 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
12 #include "grit/locale_settings.h" | 12 #include "grit/locale_settings.h" |
13 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
14 #include "views/controls/label.h" | 14 #include "views/controls/label.h" |
15 #include "views/standard_layout.h" | 15 #include "views/layout/layout_constants.h" |
16 #include "views/window/window.h" | 16 #include "views/window/window.h" |
17 | 17 |
18 // Default size of the dialog window. | 18 // Default size of the dialog window. |
19 static const int kDefaultWindowWidth = 320; | 19 static const int kDefaultWindowWidth = 320; |
20 static const int kDefaultWindowHeight = 100; | 20 static const int kDefaultWindowHeight = 100; |
21 | 21 |
22 ImporterLockView::ImporterLockView(ImporterHost* host) | 22 ImporterLockView::ImporterLockView(ImporterHost* host) |
23 : description_label_(NULL), | 23 : description_label_(NULL), |
24 importer_host_(host) { | 24 importer_host_(host) { |
25 description_label_ = new views::Label( | 25 description_label_ = new views::Label( |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 bool ImporterLockView::Cancel() { | 71 bool ImporterLockView::Cancel() { |
72 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( | 72 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod( |
73 importer_host_, &ImporterHost::OnLockViewEnd, false)); | 73 importer_host_, &ImporterHost::OnLockViewEnd, false)); |
74 return true; | 74 return true; |
75 } | 75 } |
76 | 76 |
77 views::View* ImporterLockView::GetContentsView() { | 77 views::View* ImporterLockView::GetContentsView() { |
78 return this; | 78 return this; |
79 } | 79 } |
OLD | NEW |