| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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" |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 } else { | 560 } else { |
| 561 instance_->Activate(); | 561 instance_->Activate(); |
| 562 } | 562 } |
| 563 } | 563 } |
| 564 | 564 |
| 565 CookiesView::~CookiesView() { | 565 CookiesView::~CookiesView() { |
| 566 cookies_table_->SetModel(NULL); | 566 cookies_table_->SetModel(NULL); |
| 567 } | 567 } |
| 568 | 568 |
| 569 void CookiesView::UpdateSearchResults() { | 569 void CookiesView::UpdateSearchResults() { |
| 570 cookies_table_model_->UpdateSearchResults(search_field_->GetText()); | 570 cookies_table_model_->UpdateSearchResults(search_field_->text()); |
| 571 remove_all_button_->SetEnabled(cookies_table_model_->RowCount() > 0); | 571 remove_all_button_->SetEnabled(cookies_table_model_->RowCount() > 0); |
| 572 } | 572 } |
| 573 | 573 |
| 574 /////////////////////////////////////////////////////////////////////////////// | 574 /////////////////////////////////////////////////////////////////////////////// |
| 575 // CookiesView, views::Buttonlistener implementation: | 575 // CookiesView, views::Buttonlistener implementation: |
| 576 | 576 |
| 577 void CookiesView::ButtonPressed(views::Button* sender) { | 577 void CookiesView::ButtonPressed(views::Button* sender) { |
| 578 if (sender == remove_button_) { | 578 if (sender == remove_button_) { |
| 579 cookies_table_->RemoveSelectedCookies(); | 579 cookies_table_->RemoveSelectedCookies(); |
| 580 } else if (sender == remove_all_button_) { | 580 } else if (sender == remove_all_button_) { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 void CookiesView::ResetSearchQuery() { | 781 void CookiesView::ResetSearchQuery() { |
| 782 search_field_->SetText(EmptyWString()); | 782 search_field_->SetText(EmptyWString()); |
| 783 UpdateSearchResults(); | 783 UpdateSearchResults(); |
| 784 } | 784 } |
| 785 | 785 |
| 786 void CookiesView::UpdateForEmptyState() { | 786 void CookiesView::UpdateForEmptyState() { |
| 787 info_view_->ClearCookieDisplay(); | 787 info_view_->ClearCookieDisplay(); |
| 788 remove_button_->SetEnabled(false); | 788 remove_button_->SetEnabled(false); |
| 789 remove_all_button_->SetEnabled(false); | 789 remove_all_button_->SetEnabled(false); |
| 790 } | 790 } |
| OLD | NEW |