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

Side by Side Diff: ash/wm/overview/window_selector_item.h

Issue 358553004: Added text filtering to Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Terry's comments. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ 5 #ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ 6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // label is read. 76 // label is read.
77 void SendFocusAlert() const; 77 void SendFocusAlert() const;
78 78
79 const gfx::Rect& bounds() const { return bounds_; } 79 const gfx::Rect& bounds() const { return bounds_; }
80 const gfx::Rect& target_bounds() const { return target_bounds_; } 80 const gfx::Rect& target_bounds() const { return target_bounds_; }
81 81
82 // views::ButtonListener: 82 // views::ButtonListener:
83 virtual void ButtonPressed(views::Button* sender, 83 virtual void ButtonPressed(views::Button* sender,
84 const ui::Event& event) OVERRIDE; 84 const ui::Event& event) OVERRIDE;
85 85
86 // Sets if the item is dimmed in the overview. Changing the value will also
87 // change the visibility of the transform windows.
88 void SetDimmed(bool dimmed);
89 bool dimmed() const { return dimmed_; }
90
86 protected: 91 protected:
87 // Sets the bounds of this selector's items to |target_bounds| in 92 // Sets the bounds of this selector's items to |target_bounds| in
88 // |root_window|. If |animate| the windows are animated from their current 93 // |root_window|. If |animate| the windows are animated from their current
89 // location. 94 // location.
90 virtual void SetItemBounds(aura::Window* root_window, 95 virtual void SetItemBounds(aura::Window* root_window,
91 const gfx::Rect& target_bounds, 96 const gfx::Rect& target_bounds,
92 bool animate) = 0; 97 bool animate) = 0;
93 98
99 // Changes the visibility of the item.
100 virtual void ChangeItemVisibility(bool visible) = 0;
flackr 2014/06/26 17:33:08 nit: Items aren't becoming invisible, just not ful
Nina 2014/06/27 15:20:39 Done.
101
94 // Sets the bounds used by the selector item's windows. 102 // Sets the bounds used by the selector item's windows.
95 void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds; } 103 void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds; }
96 104
105 // True if the item is being shown in the overview, false if it's being
106 // filtered.
107 bool dimmed_;
108
97 private: 109 private:
98 friend class WindowSelectorTest; 110 friend class WindowSelectorTest;
99 111
100 // Creates |close_button_| if it does not exist and updates the bounds based 112 // Creates |close_button_| if it does not exist and updates the bounds based
101 // on GetCloseButtonTargetBounds() 113 // on GetCloseButtonTargetBounds()
102 void UpdateCloseButtonBounds(aura::Window* root_window, bool animate); 114 void UpdateCloseButtonBounds(aura::Window* root_window, bool animate);
103 115
104 // Creates a label to display under the window selector item. 116 // Creates a label to display under the window selector item.
105 void UpdateWindowLabels(const gfx::Rect& target_bounds, 117 void UpdateWindowLabels(const gfx::Rect& target_bounds,
106 aura::Window* root_window, 118 aura::Window* root_window,
(...skipping 23 matching lines...) Expand all
130 // Transparent window on top of the real windows in the overview that 142 // Transparent window on top of the real windows in the overview that
131 // activates them on click or tap. 143 // activates them on click or tap.
132 scoped_ptr<TransparentActivateWindowButton> activate_window_button_; 144 scoped_ptr<TransparentActivateWindowButton> activate_window_button_;
133 145
134 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); 146 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem);
135 }; 147 };
136 148
137 } // namespace ash 149 } // namespace ash
138 150
139 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ 151 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698