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

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 unittest Created 6 years, 5 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/aura/window_observer.h" 10 #include "ui/aura/window_observer.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 bool animate); 72 bool animate);
73 73
74 // Recomputes the positions for the windows in this selection item. This is 74 // Recomputes the positions for the windows in this selection item. This is
75 // dispatched when the bounds of a window change. 75 // dispatched when the bounds of a window change.
76 void RecomputeWindowTransforms(); 76 void RecomputeWindowTransforms();
77 77
78 // Sends an a11y focus alert so that, if chromevox is enabled, the window 78 // Sends an a11y focus alert so that, if chromevox is enabled, the window
79 // label is read. 79 // label is read.
80 void SendFocusAlert() const; 80 void SendFocusAlert() const;
81 81
82 // Sets if the item is dimmed in the overview. Changing the value will also
83 // change the visibility of the transform windows.
84 virtual void SetDimmed(bool dimmed);
85 bool dimmed() const { return dimmed_; }
86
82 const gfx::Rect& bounds() const { return bounds_; } 87 const gfx::Rect& bounds() const { return bounds_; }
83 const gfx::Rect& target_bounds() const { return target_bounds_; } 88 const gfx::Rect& target_bounds() const { return target_bounds_; }
84 89
85 // views::ButtonListener: 90 // views::ButtonListener:
86 virtual void ButtonPressed(views::Button* sender, 91 virtual void ButtonPressed(views::Button* sender,
87 const ui::Event& event) OVERRIDE; 92 const ui::Event& event) OVERRIDE;
88 93
89 // aura::WindowObserver: 94 // aura::WindowObserver:
90 virtual void OnWindowTitleChanged(aura::Window* window) OVERRIDE; 95 virtual void OnWindowTitleChanged(aura::Window* window) OVERRIDE;
91 96
92 protected: 97 protected:
93 // Sets the bounds of this selector's items to |target_bounds| in 98 // Sets the bounds of this selector's items to |target_bounds| in
94 // |root_window|. If |animate| the windows are animated from their current 99 // |root_window|. If |animate| the windows are animated from their current
95 // location. 100 // location.
96 virtual void SetItemBounds(aura::Window* root_window, 101 virtual void SetItemBounds(aura::Window* root_window,
97 const gfx::Rect& target_bounds, 102 const gfx::Rect& target_bounds,
98 bool animate) = 0; 103 bool animate) = 0;
99 104
100 // Sets the bounds used by the selector item's windows. 105 // Sets the bounds used by the selector item's windows.
101 void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds; } 106 void set_bounds(const gfx::Rect& bounds) { bounds_ = bounds; }
102 107
108 // Changes the opacity of all the windows the item owns.
109 virtual void SetOpacity(float opacity);
110
111 // True if the item is being shown in the overview, false if it's being
112 // filtered.
113 bool dimmed_;
114
103 private: 115 private:
104 friend class WindowSelectorTest; 116 friend class WindowSelectorTest;
105 117
106 // Creates |close_button_| if it does not exist and updates the bounds based 118 // Creates |close_button_| if it does not exist and updates the bounds based
107 // on GetCloseButtonTargetBounds() 119 // on GetCloseButtonTargetBounds()
108 void UpdateCloseButtonBounds(aura::Window* root_window, bool animate); 120 void UpdateCloseButtonBounds(aura::Window* root_window, bool animate);
109 121
110 // Creates a label to display under the window selector item. 122 // Creates a label to display under the window selector item.
111 void UpdateWindowLabels(const gfx::Rect& target_bounds, 123 void UpdateWindowLabels(const gfx::Rect& target_bounds,
112 aura::Window* root_window, 124 aura::Window* root_window,
(...skipping 29 matching lines...) Expand all
142 // Transparent window on top of the real windows in the overview that 154 // Transparent window on top of the real windows in the overview that
143 // activates them on click or tap. 155 // activates them on click or tap.
144 scoped_ptr<TransparentActivateWindowButton> activate_window_button_; 156 scoped_ptr<TransparentActivateWindowButton> activate_window_button_;
145 157
146 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem); 158 DISALLOW_COPY_AND_ASSIGN(WindowSelectorItem);
147 }; 159 };
148 160
149 } // namespace ash 161 } // namespace ash
150 162
151 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_ 163 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698