| OLD | NEW |
| 1 // Copyright (c) 2009 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/options/cookies_view.h" | 5 #include "chrome/browser/views/options/cookies_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/gfx/canvas.h" | 9 #include "app/gfx/canvas.h" |
| 10 #include "app/gfx/color_utils.h" | 10 #include "app/gfx/color_utils.h" |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 473 |
| 474 // Add the Remove/Remove All buttons to the ClientView | 474 // Add the Remove/Remove All buttons to the ClientView |
| 475 View* parent = GetParent(); | 475 View* parent = GetParent(); |
| 476 parent->AddChildView(remove_button_); | 476 parent->AddChildView(remove_button_); |
| 477 parent->AddChildView(remove_all_button_); | 477 parent->AddChildView(remove_all_button_); |
| 478 if (!cookies_tree_model_.get()->GetRoot()->GetChildCount()) | 478 if (!cookies_tree_model_.get()->GetRoot()->GetChildCount()) |
| 479 UpdateForEmptyState(); | 479 UpdateForEmptyState(); |
| 480 } | 480 } |
| 481 | 481 |
| 482 void CookiesView::ResetSearchQuery() { | 482 void CookiesView::ResetSearchQuery() { |
| 483 search_field_->SetText(EmptyWString()); | 483 search_field_->SetText(std::wstring()); |
| 484 clear_search_button_->SetEnabled(false); | 484 clear_search_button_->SetEnabled(false); |
| 485 UpdateSearchResults(); | 485 UpdateSearchResults(); |
| 486 } | 486 } |
| 487 | 487 |
| 488 void CookiesView::UpdateForEmptyState() { | 488 void CookiesView::UpdateForEmptyState() { |
| 489 info_view_->ClearCookieDisplay(); | 489 info_view_->ClearCookieDisplay(); |
| 490 remove_button_->SetEnabled(false); | 490 remove_button_->SetEnabled(false); |
| 491 remove_all_button_->SetEnabled(false); | 491 remove_all_button_->SetEnabled(false); |
| 492 } | 492 } |
| OLD | NEW |