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" |
| 6 |
5 #include <algorithm> | 7 #include <algorithm> |
6 | 8 |
7 #include "chrome/browser/views/options/cookies_view.h" | |
8 | |
9 #include "app/gfx/chrome_canvas.h" | 9 #include "app/gfx/chrome_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" |
12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "base/time_format.h" | 15 #include "base/time_format.h" |
16 #include "chrome/browser/profile.h" | 16 #include "chrome/browser/profile.h" |
17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
18 #include "grit/locale_settings.h" | 18 #include "grit/locale_settings.h" |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 CookiesView::CookiesView(Profile* profile) | 690 CookiesView::CookiesView(Profile* profile) |
691 : search_label_(NULL), | 691 : search_label_(NULL), |
692 search_field_(NULL), | 692 search_field_(NULL), |
693 clear_search_button_(NULL), | 693 clear_search_button_(NULL), |
694 description_label_(NULL), | 694 description_label_(NULL), |
695 cookies_table_(NULL), | 695 cookies_table_(NULL), |
696 info_view_(NULL), | 696 info_view_(NULL), |
697 remove_button_(NULL), | 697 remove_button_(NULL), |
698 remove_all_button_(NULL), | 698 remove_all_button_(NULL), |
699 profile_(profile), | 699 profile_(profile), |
700 search_update_factory_(this) { | 700 ALLOW_THIS_IN_INITIALIZER_LIST(search_update_factory_(this)) { |
701 } | 701 } |
702 | 702 |
703 void CookiesView::Init() { | 703 void CookiesView::Init() { |
704 search_label_ = new views::Label( | 704 search_label_ = new views::Label( |
705 l10n_util::GetString(IDS_COOKIES_SEARCH_LABEL)); | 705 l10n_util::GetString(IDS_COOKIES_SEARCH_LABEL)); |
706 search_field_ = new views::TextField; | 706 search_field_ = new views::TextField; |
707 search_field_->SetController(this); | 707 search_field_->SetController(this); |
708 clear_search_button_ = new views::NativeButton( | 708 clear_search_button_ = new views::NativeButton( |
709 this, l10n_util::GetString(IDS_COOKIES_CLEAR_SEARCH_LABEL)); | 709 this, l10n_util::GetString(IDS_COOKIES_CLEAR_SEARCH_LABEL)); |
710 description_label_ = new views::Label( | 710 description_label_ = new views::Label( |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 void CookiesView::ResetSearchQuery() { | 784 void CookiesView::ResetSearchQuery() { |
785 search_field_->SetText(EmptyWString()); | 785 search_field_->SetText(EmptyWString()); |
786 UpdateSearchResults(); | 786 UpdateSearchResults(); |
787 } | 787 } |
788 | 788 |
789 void CookiesView::UpdateForEmptyState() { | 789 void CookiesView::UpdateForEmptyState() { |
790 info_view_->ClearCookieDisplay(); | 790 info_view_->ClearCookieDisplay(); |
791 remove_button_->SetEnabled(false); | 791 remove_button_->SetEnabled(false); |
792 remove_all_button_->SetEnabled(false); | 792 remove_all_button_->SetEnabled(false); |
793 } | 793 } |
OLD | NEW |