| 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_browsing_data.h" | 5 #include "chrome/browser/ui/views/clear_browsing_data.h" |
| 6 | 6 |
| 7 #include "base/string16.h" | 7 #include "base/string16.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 layout->AddView(new views::Separator()); | 351 layout->AddView(new views::Separator()); |
| 352 layout->StartRowWithPadding(0, 0, 0, views::kRelatedControlVerticalSpacing); | 352 layout->StartRowWithPadding(0, 0, 0, views::kRelatedControlVerticalSpacing); |
| 353 layout->AddView(flash_link, 1, 1, GridLayout::LEADING, GridLayout::CENTER); | 353 layout->AddView(flash_link, 1, 1, GridLayout::LEADING, GridLayout::CENTER); |
| 354 | 354 |
| 355 views::DialogClientView* client_view = | 355 views::DialogClientView* client_view = |
| 356 new views::DialogClientView(window, GetContentsView()); | 356 new views::DialogClientView(window, GetContentsView()); |
| 357 client_view->SetBottomView(settings_view); | 357 client_view->SetBottomView(settings_view); |
| 358 return client_view; | 358 return client_view; |
| 359 } | 359 } |
| 360 | 360 |
| 361 views::View* ClearBrowsingDataView::GetExtraView() { |
| 362 return throbber_view_; |
| 363 } |
| 364 |
| 365 bool ClearBrowsingDataView::GetSizeExtraViewHeightToButtons() { |
| 366 return true; |
| 367 } |
| 368 |
| 361 //////////////////////////////////////////////////////////////////////////////// | 369 //////////////////////////////////////////////////////////////////////////////// |
| 362 // ClearBrowsingDataView, ComboboxModel implementation: | 370 // ClearBrowsingDataView, ComboboxModel implementation: |
| 363 | 371 |
| 364 int ClearBrowsingDataView::GetItemCount() { | 372 int ClearBrowsingDataView::GetItemCount() { |
| 365 return 5; | 373 return 5; |
| 366 } | 374 } |
| 367 | 375 |
| 368 string16 ClearBrowsingDataView::GetItemAt(int index) { | 376 string16 ClearBrowsingDataView::GetItemAt(int index) { |
| 369 switch (index) { | 377 switch (index) { |
| 370 case 0: return l10n_util::GetStringUTF16(IDS_CLEAR_DATA_HOUR); | 378 case 0: return l10n_util::GetStringUTF16(IDS_CLEAR_DATA_HOUR); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 remover_->AddObserver(this); | 479 remover_->AddObserver(this); |
| 472 remover_->Remove(remove_mask); | 480 remover_->Remove(remove_mask); |
| 473 } | 481 } |
| 474 | 482 |
| 475 void ClearBrowsingDataView::OnBrowsingDataRemoverDone() { | 483 void ClearBrowsingDataView::OnBrowsingDataRemoverDone() { |
| 476 // No need to remove ourselves as an observer as BrowsingDataRemover deletes | 484 // No need to remove ourselves as an observer as BrowsingDataRemover deletes |
| 477 // itself after we return. | 485 // itself after we return. |
| 478 remover_ = NULL; | 486 remover_ = NULL; |
| 479 window()->Close(); | 487 window()->Close(); |
| 480 } | 488 } |
| OLD | NEW |