Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: chrome/browser/ui/views/options/cookies_view.cc

Issue 6246001: Move app/key* to ui/base/keycodes/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 const std::wstring& new_contents) { 139 const std::wstring& new_contents) {
140 clear_search_button_->SetEnabled(!search_field_->text().empty()); 140 clear_search_button_->SetEnabled(!search_field_->text().empty());
141 search_update_factory_.RevokeAll(); 141 search_update_factory_.RevokeAll();
142 MessageLoop::current()->PostDelayedTask(FROM_HERE, 142 MessageLoop::current()->PostDelayedTask(FROM_HERE,
143 search_update_factory_.NewRunnableMethod( 143 search_update_factory_.NewRunnableMethod(
144 &CookiesView::UpdateSearchResults), kSearchFilterDelayMs); 144 &CookiesView::UpdateSearchResults), kSearchFilterDelayMs);
145 } 145 }
146 146
147 bool CookiesView::HandleKeyEvent(views::Textfield* sender, 147 bool CookiesView::HandleKeyEvent(views::Textfield* sender,
148 const views::KeyEvent& key_event) { 148 const views::KeyEvent& key_event) {
149 if (key_event.GetKeyCode() == app::VKEY_ESCAPE) { 149 if (key_event.GetKeyCode() == ui::VKEY_ESCAPE) {
150 ResetSearchQuery(); 150 ResetSearchQuery();
151 } else if (key_event.GetKeyCode() == app::VKEY_RETURN) { 151 } else if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
152 search_update_factory_.RevokeAll(); 152 search_update_factory_.RevokeAll();
153 UpdateSearchResults(); 153 UpdateSearchResults();
154 } 154 }
155 return false; 155 return false;
156 } 156 }
157 157
158 /////////////////////////////////////////////////////////////////////////////// 158 ///////////////////////////////////////////////////////////////////////////////
159 // CookiesView, views::DialogDelegate implementation: 159 // CookiesView, views::DialogDelegate implementation:
160 160
161 std::wstring CookiesView::GetWindowTitle() const { 161 std::wstring CookiesView::GetWindowTitle() const {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } else if (detailed_info.node_type == 234 } else if (detailed_info.node_type ==
235 CookieTreeNode::DetailedInfo::TYPE_INDEXED_DB) { 235 CookieTreeNode::DetailedInfo::TYPE_INDEXED_DB) {
236 UpdateVisibleDetailedInfo(indexed_db_info_view_); 236 UpdateVisibleDetailedInfo(indexed_db_info_view_);
237 indexed_db_info_view_->SetIndexedDBInfo(*detailed_info.indexed_db_info); 237 indexed_db_info_view_->SetIndexedDBInfo(*detailed_info.indexed_db_info);
238 } else { 238 } else {
239 UpdateVisibleDetailedInfo(cookie_info_view_); 239 UpdateVisibleDetailedInfo(cookie_info_view_);
240 cookie_info_view_->ClearCookieDisplay(); 240 cookie_info_view_->ClearCookieDisplay();
241 } 241 }
242 } 242 }
243 243
244 void CookiesView::OnTreeViewKeyDown(app::KeyboardCode keycode) { 244 void CookiesView::OnTreeViewKeyDown(ui::KeyboardCode keycode) {
245 if (keycode == app::VKEY_DELETE) 245 if (keycode == ui::VKEY_DELETE)
246 cookies_tree_->RemoveSelectedItems(); 246 cookies_tree_->RemoveSelectedItems();
247 } 247 }
248 248
249 /////////////////////////////////////////////////////////////////////////////// 249 ///////////////////////////////////////////////////////////////////////////////
250 // CookiesView, public: 250 // CookiesView, public:
251 251
252 void CookiesView::UpdateSearchResults() { 252 void CookiesView::UpdateSearchResults() {
253 cookies_tree_model_->UpdateSearchResults(search_field_->text()); 253 cookies_tree_model_->UpdateSearchResults(search_field_->text());
254 UpdateRemoveButtonsState(); 254 UpdateRemoveButtonsState();
255 } 255 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 GetTotalNodeCount() > 1); 392 GetTotalNodeCount() > 1);
393 } 393 }
394 394
395 void CookiesView::UpdateVisibleDetailedInfo(views::View* view) { 395 void CookiesView::UpdateVisibleDetailedInfo(views::View* view) {
396 cookie_info_view_->SetVisible(view == cookie_info_view_); 396 cookie_info_view_->SetVisible(view == cookie_info_view_);
397 database_info_view_->SetVisible(view == database_info_view_); 397 database_info_view_->SetVisible(view == database_info_view_);
398 local_storage_info_view_->SetVisible(view == local_storage_info_view_); 398 local_storage_info_view_->SetVisible(view == local_storage_info_view_);
399 appcache_info_view_->SetVisible(view == appcache_info_view_); 399 appcache_info_view_->SetVisible(view == appcache_info_view_);
400 indexed_db_info_view_->SetVisible(view == indexed_db_info_view_); 400 indexed_db_info_view_->SetVisible(view == indexed_db_info_view_);
401 } 401 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/options/cookies_view.h ('k') | chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698