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

Unified Diff: ash/wm/overview/window_selector.h

Issue 358553004: Added text filtering to Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/overview/window_selector.h
diff --git a/ash/wm/overview/window_selector.h b/ash/wm/overview/window_selector.h
index f9ca51a64db03108ec88014ad5d1e8155fdc5d27..810641bc0b8f3dfbcb9d88e66f3486a78ea736c0 100644
--- a/ash/wm/overview/window_selector.h
+++ b/ash/wm/overview/window_selector.h
@@ -17,6 +17,7 @@
#include "ui/aura/window_tracker.h"
#include "ui/events/event_handler.h"
#include "ui/gfx/display_observer.h"
+#include "ui/views/controls/textfield/textfield_controller.h"
#include "ui/wm/public/activation_change_observer.h"
namespace aura {
@@ -32,6 +33,11 @@ namespace ui {
class LocatedEvent;
}
+namespace views {
+class Textfield;
+class Widget;
+}
+
namespace ash {
class WindowSelectorDelegate;
class WindowSelectorItem;
@@ -41,10 +47,10 @@ class WindowGrid;
// The WindowSelector shows a grid of all of your windows, allowing to select
// one by clicking or tapping on it.
class ASH_EXPORT WindowSelector
- : public ui::EventHandler,
- public gfx::DisplayObserver,
+ : public gfx::DisplayObserver,
public aura::WindowObserver,
- public aura::client::ActivationChangeObserver {
+ public aura::client::ActivationChangeObserver,
+ public views::TextfieldController {
public:
enum Direction {
LEFT,
@@ -66,9 +72,6 @@ class ASH_EXPORT WindowSelector
// Called when the last window selector item from a grid is deleted.
void OnGridEmpty(WindowGrid* grid);
- // ui::EventHandler:
- virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
-
// gfx::DisplayObserver:
virtual void OnDisplayAdded(const gfx::Display& display) OVERRIDE;
virtual void OnDisplayRemoved(const gfx::Display& display) OVERRIDE;
@@ -86,6 +89,13 @@ class ASH_EXPORT WindowSelector
aura::Window* request_active,
aura::Window* actual_active) OVERRIDE;
+ // views::TextfieldController:
+ virtual void ContentsChanged(views::Textfield* sender,
+ const base::string16& new_contents) OVERRIDE;
+
tdanderson 2014/06/25 15:48:23 Remove blank line
Nina 2014/06/26 15:20:18 Done.
+ virtual bool HandleKeyEvent(views::Textfield* sender,
+ const ui::KeyEvent& key_event);
tdanderson 2014/06/25 15:48:23 OVERRIDE
Nina 2014/06/26 15:20:18 Done.
+
private:
friend class WindowSelectorTest;
@@ -142,6 +152,12 @@ class ASH_EXPORT WindowSelector
// The number of items in the overview.
size_t num_items_;
+ // Indicates if we are showing the selection widget.
+ bool showing_selection_widget_;
+
+ // Window text filter widget.
tdanderson 2014/06/25 15:48:23 Explain in a bit more detail what this is / what i
Nina 2014/06/26 15:20:17 Done.
+ scoped_ptr<views::Widget> text_filter_widget_;
+
DISALLOW_COPY_AND_ASSIGN(WindowSelector);
};

Powered by Google App Engine
This is Rietveld 408576698