| 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/options/cookies_view.h" | 5 #include "chrome/browser/ui/views/options/cookies_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 const std::wstring& new_contents) { | 138 const std::wstring& new_contents) { |
| 139 clear_search_button_->SetEnabled(!search_field_->text().empty()); | 139 clear_search_button_->SetEnabled(!search_field_->text().empty()); |
| 140 search_update_factory_.RevokeAll(); | 140 search_update_factory_.RevokeAll(); |
| 141 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 141 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
| 142 search_update_factory_.NewRunnableMethod( | 142 search_update_factory_.NewRunnableMethod( |
| 143 &CookiesView::UpdateSearchResults), kSearchFilterDelayMs); | 143 &CookiesView::UpdateSearchResults), kSearchFilterDelayMs); |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool CookiesView::HandleKeyEvent(views::Textfield* sender, | 146 bool CookiesView::HandleKeyEvent(views::Textfield* sender, |
| 147 const views::KeyEvent& key_event) { | 147 const views::KeyEvent& key_event) { |
| 148 if (key_event.GetKeyCode() == ui::VKEY_ESCAPE) { | 148 if (key_event.key_code() == ui::VKEY_ESCAPE) { |
| 149 ResetSearchQuery(); | 149 ResetSearchQuery(); |
| 150 } else if (key_event.GetKeyCode() == ui::VKEY_RETURN) { | 150 } else if (key_event.key_code() == ui::VKEY_RETURN) { |
| 151 search_update_factory_.RevokeAll(); | 151 search_update_factory_.RevokeAll(); |
| 152 UpdateSearchResults(); | 152 UpdateSearchResults(); |
| 153 } | 153 } |
| 154 return false; | 154 return false; |
| 155 } | 155 } |
| 156 | 156 |
| 157 /////////////////////////////////////////////////////////////////////////////// | 157 /////////////////////////////////////////////////////////////////////////////// |
| 158 // CookiesView, views::DialogDelegate implementation: | 158 // CookiesView, views::DialogDelegate implementation: |
| 159 | 159 |
| 160 std::wstring CookiesView::GetWindowTitle() const { | 160 std::wstring CookiesView::GetWindowTitle() const { |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 GetTotalNodeCount() > 1); | 391 GetTotalNodeCount() > 1); |
| 392 } | 392 } |
| 393 | 393 |
| 394 void CookiesView::UpdateVisibleDetailedInfo(views::View* view) { | 394 void CookiesView::UpdateVisibleDetailedInfo(views::View* view) { |
| 395 cookie_info_view_->SetVisible(view == cookie_info_view_); | 395 cookie_info_view_->SetVisible(view == cookie_info_view_); |
| 396 database_info_view_->SetVisible(view == database_info_view_); | 396 database_info_view_->SetVisible(view == database_info_view_); |
| 397 local_storage_info_view_->SetVisible(view == local_storage_info_view_); | 397 local_storage_info_view_->SetVisible(view == local_storage_info_view_); |
| 398 appcache_info_view_->SetVisible(view == appcache_info_view_); | 398 appcache_info_view_->SetVisible(view == appcache_info_view_); |
| 399 indexed_db_info_view_->SetVisible(view == indexed_db_info_view_); | 399 indexed_db_info_view_->SetVisible(view == indexed_db_info_view_); |
| 400 } | 400 } |
| OLD | NEW |