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/clear_data_view.h" | 5 #include "chrome/browser/ui/views/clear_data_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 clear_server_data_tab_(NULL), | 46 clear_server_data_tab_(NULL), |
47 clear_browsing_data_tab_(NULL), | 47 clear_browsing_data_tab_(NULL), |
48 clearing_data_(false) { | 48 clearing_data_(false) { |
49 DCHECK(profile); | 49 DCHECK(profile); |
50 Init(); | 50 Init(); |
51 } | 51 } |
52 | 52 |
53 void ClearDataView::Init() { | 53 void ClearDataView::Init() { |
54 tabs_ = new views::TabbedPane; | 54 tabs_ = new views::TabbedPane; |
55 | 55 |
56 tabs_->SetAccessibleName( | 56 tabs_->SetAccessibleName(l10n_util::GetStringFUTF16( |
57 UTF16ToWide(l10n_util::GetStringFUTF16(IDS_OPTIONS_DIALOG_TITLE, | 57 IDS_OPTIONS_DIALOG_TITLE, |
58 l10n_util::GetStringUTF16(IDS_OPTIONS_DIALOG_TITLE)))); | 58 l10n_util::GetStringUTF16(IDS_OPTIONS_DIALOG_TITLE))); |
59 AddChildView(tabs_); | 59 AddChildView(tabs_); |
60 | 60 |
61 int tab_index = 0; | 61 int tab_index = 0; |
62 clear_browsing_data_tab_ = new ClearBrowsingDataView2(profile_, this); | 62 clear_browsing_data_tab_ = new ClearBrowsingDataView2(profile_, this); |
63 tabs_->AddTabAtIndex( | 63 tabs_->AddTabAtIndex( |
64 tab_index++, | 64 tab_index++, |
65 UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_CHROME_DATA_TAB_LABEL)), | 65 UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_CHROME_DATA_TAB_LABEL)), |
66 clear_browsing_data_tab_, false); | 66 clear_browsing_data_tab_, false); |
67 clear_server_data_tab_ = new ClearServerDataView(profile_, this); | 67 clear_server_data_tab_ = new ClearServerDataView(profile_, this); |
68 tabs_->AddTabAtIndex( | 68 tabs_->AddTabAtIndex( |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 } | 168 } |
169 | 169 |
170 views::View* ClearDataView::GetContentsView() { | 170 views::View* ClearDataView::GetContentsView() { |
171 return this; | 171 return this; |
172 } | 172 } |
173 | 173 |
174 views::View* ClearDataView::GetInitiallyFocusedView() { | 174 views::View* ClearDataView::GetInitiallyFocusedView() { |
175 return GetDialogClientView()->cancel_button(); | 175 return GetDialogClientView()->cancel_button(); |
176 } | 176 } |
177 | 177 |
OLD | NEW |