summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-15 19:28:28 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-15 19:28:28 +0000
commitf4478650f67db995d17f3d880236f0d4eb5926e8 (patch)
tree4fc576ebe24ea27ef1aa3bdd1b78997d2529fda8
parent6bfe46e70aaf6edc4377b5c019b573557d5d20c7 (diff)
downloadchromium_src-f4478650f67db995d17f3d880236f0d4eb5926e8.zip
chromium_src-f4478650f67db995d17f3d880236f0d4eb5926e8.tar.gz
chromium_src-f4478650f67db995d17f3d880236f0d4eb5926e8.tar.bz2
Fixes cookies view regression where I broke deleting by way of delete
key. I broke this when I added an observer method for the deletion so that overriding key down no longer works. BUG=5472 TEST=see bug Review URL: http://codereview.chromium.org/14430 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6996 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/options/cookies_view.cc13
-rw-r--r--chrome/browser/views/options/cookies_view.h5
2 files changed, 8 insertions, 10 deletions
diff --git a/chrome/browser/views/options/cookies_view.cc b/chrome/browser/views/options/cookies_view.cc
index 42577fe..c019a9e 100644
--- a/chrome/browser/views/options/cookies_view.cc
+++ b/chrome/browser/views/options/cookies_view.cc
@@ -249,10 +249,6 @@ class CookiesTableView : public views::TableView {
// Removes the cookies associated with the selected rows in the TableView.
void RemoveSelectedCookies();
- protected:
- // views::TableView implementation:
- virtual void OnKeyDown(unsigned short virtual_keycode);
-
private:
// Our model, as a CookiesTableModel.
CookiesTableModel* cookies_model_;
@@ -300,11 +296,6 @@ void CookiesTableView::RemoveSelectedCookies() {
last_selected_view_row - remove_count + 1)));
}
-void CookiesTableView::OnKeyDown(unsigned short virtual_keycode) {
- if (virtual_keycode == VK_DELETE)
- RemoveSelectedCookies();
-}
-
///////////////////////////////////////////////////////////////////////////////
// CookieInfoView
//
@@ -603,6 +594,10 @@ void CookiesView::OnSelectionChanged() {
UpdateForEmptyState();
}
+void CookiesView::OnTableViewDelete(views::TableView* table_view) {
+ cookies_table_->RemoveSelectedCookies();
+}
+
///////////////////////////////////////////////////////////////////////////////
// CookiesView, views::TextField::Controller implementation:
diff --git a/chrome/browser/views/options/cookies_view.h b/chrome/browser/views/options/cookies_view.h
index 946382b..ee50b9d 100644
--- a/chrome/browser/views/options/cookies_view.h
+++ b/chrome/browser/views/options/cookies_view.h
@@ -41,6 +41,10 @@ class CookiesView : public views::View,
// views::TableViewObserver implementation:
virtual void OnSelectionChanged();
+ // Invoked when the user presses the delete key. Deletes the selected
+ // cookies.
+ virtual void OnTableViewDelete(views::TableView* table_view);
+
// views::TextField::Controller implementation:
virtual void ContentsChanged(views::TextField* sender,
const std::wstring& new_contents);
@@ -110,4 +114,3 @@ class CookiesView : public views::View,
};
#endif // #ifndef CHROME_BROWSER_VIEWS_OPTIONS_GENERAL_PAGE_VIEW_H__
-