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

Unified Diff: chrome/browser/views/options/cookies_view.h

Issue 435024: Adds back the ability to filter cookies by origin in the cookies options view... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cookies_tree_model.cc ('k') | chrome/browser/views/options/cookies_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/options/cookies_view.h
===================================================================
--- chrome/browser/views/options/cookies_view.h (revision 32803)
+++ chrome/browser/views/options/cookies_view.h (working copy)
@@ -34,13 +34,17 @@
class CookiesView : public views::View,
public views::DialogDelegate,
public views::ButtonListener,
- public views::TreeViewController {
+ public views::TreeViewController,
+ public views::Textfield::Controller {
public:
// Show the Cookies Window, creating one if necessary.
static void ShowCookiesWindow(Profile* profile);
virtual ~CookiesView();
+ // Updates the display to show only the search results.
+ void UpdateSearchResults();
+
// views::ButtonListener implementation.
virtual void ButtonPressed(views::Button* sender, const views::Event& event);
@@ -50,11 +54,19 @@
// views::TreeViewController implementation.
virtual void OnTreeViewKeyDown(base::KeyboardCode keycode);
+ // views::Textfield::Controller implementation.
+ virtual void ContentsChanged(views::Textfield* sender,
+ const std::wstring& new_contents);
+ virtual bool HandleKeystroke(views::Textfield* sender,
+ const views::Textfield::Keystroke& key);
+
// views::WindowDelegate implementation.
virtual int GetDialogButtons() const {
return MessageBoxFlags::DIALOGBUTTON_CANCEL;
}
- virtual views::View* GetInitiallyFocusedView();
+ virtual views::View* GetInitiallyFocusedView() {
+ return search_field_;
+ }
virtual bool CanResize() const { return true; }
virtual std::wstring GetWindowTitle() const;
@@ -78,10 +90,16 @@
// Initialize the dialog contents and layout.
void Init();
+ // Resets the display to what it would be if there were no search query.
+ void ResetSearchQuery();
+
// Update the UI when there are no cookies.
void UpdateForEmptyState();
// Assorted dialog controls
+ views::Label* search_label_;
+ views::Textfield* search_field_;
+ views::NativeButton* clear_search_button_;
views::Label* description_label_;
CookiesTreeView* cookies_tree_;
CookieInfoView* info_view_;
@@ -94,6 +112,10 @@
// The Profile for which Cookies are displayed
Profile* profile_;
+ // A factory to construct Runnable Methods so that we can be called back to
+ // re-evaluate the model after the search query string changes.
+ ScopedRunnableMethodFactory<CookiesView> search_update_factory_;
+
// Our containing window. If this is non-NULL there is a visible Cookies
// window somewhere.
static views::Window* instance_;
« no previous file with comments | « chrome/browser/cookies_tree_model.cc ('k') | chrome/browser/views/options/cookies_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698