Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/clear_browsing_data.h" | 5 #include "chrome/browser/views/clear_browsing_data.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 25 matching lines...) Expand all Loading... | |
| 36 // The combo box is vertically aligned to the 'time-period' label, which makes | 36 // The combo box is vertically aligned to the 'time-period' label, which makes |
| 37 // the combo box look a little too close to the check box above it when we use | 37 // the combo box look a little too close to the check box above it when we use |
| 38 // standard layout to separate them. We therefore add a little extra margin to | 38 // standard layout to separate them. We therefore add a little extra margin to |
| 39 // the label, giving it a little breathing space. | 39 // the label, giving it a little breathing space. |
| 40 static const int kExtraMarginForTimePeriodLabel = 3; | 40 static const int kExtraMarginForTimePeriodLabel = 3; |
| 41 | 41 |
| 42 namespace browser { | 42 namespace browser { |
| 43 // Defined in browser_dialogs.h for creation of the view. | 43 // Defined in browser_dialogs.h for creation of the view. |
| 44 void ShowClearBrowsingDataView(gfx::NativeWindow parent, | 44 void ShowClearBrowsingDataView(gfx::NativeWindow parent, |
| 45 Profile* profile) { | 45 Profile* profile) { |
| 46 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
|
csilv
2010/11/22 19:49:17
Driveby: Is there a reason to retain this conditio
| |
| 47 views::Window::CreateChromeWindow(parent, gfx::Rect(), | 47 views::Window::CreateChromeWindow(parent, gfx::Rect(), |
| 48 new ClearDataView(profile))->Show(); | 48 new ClearBrowsingDataView(profile))->Show(); |
| 49 #else | 49 #else |
| 50 views::Window::CreateChromeWindow(parent, gfx::Rect(), | 50 views::Window::CreateChromeWindow(parent, gfx::Rect(), |
| 51 new ClearBrowsingDataView(profile))->Show(); | 51 new ClearBrowsingDataView(profile))->Show(); |
| 52 #endif | 52 #endif |
| 53 } | 53 } |
| 54 | 54 |
| 55 } // namespace browser | 55 } // namespace browser |
| 56 | 56 |
| 57 | 57 |
| 58 //////////////////////////////////////////////////////////////////////////////// | 58 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 463 remover_->AddObserver(this); | 463 remover_->AddObserver(this); |
| 464 remover_->Remove(remove_mask); | 464 remover_->Remove(remove_mask); |
| 465 } | 465 } |
| 466 | 466 |
| 467 void ClearBrowsingDataView::OnBrowsingDataRemoverDone() { | 467 void ClearBrowsingDataView::OnBrowsingDataRemoverDone() { |
| 468 // No need to remove ourselves as an observer as BrowsingDataRemover deletes | 468 // No need to remove ourselves as an observer as BrowsingDataRemover deletes |
| 469 // itself after we return. | 469 // itself after we return. |
| 470 remover_ = NULL; | 470 remover_ = NULL; |
| 471 window()->Close(); | 471 window()->Close(); |
| 472 } | 472 } |
| OLD | NEW |