Chromium Code Reviews| Index: athena/wm/window_overview_mode.cc |
| diff --git a/athena/wm/window_overview_mode.cc b/athena/wm/window_overview_mode.cc |
| index b37339e3cf7cca7b76aad83cc3e4ae66a5508c24..f33a61e50926cdf3a9e4f1eb9108d688f9adffaf 100644 |
| --- a/athena/wm/window_overview_mode.cc |
| +++ b/athena/wm/window_overview_mode.cc |
| @@ -110,18 +110,30 @@ class WindowOverviewModeImpl : public WindowOverviewMode, |
| virtual ~WindowOverviewModeImpl() { |
| container_->set_target_handler(container_->delegate()); |
| - aura::Window::Windows windows = container_->children(); |
|
sadrul
2014/07/25 20:43:14
Mikhail has a CL up (https://codereview.chromium.o
mohsen
2014/07/30 22:49:46
I talked to Mikhail and his patch might take a whi
|
| + aura::Window::Windows windows = GetNormalWindows(); |
| if (windows.empty()) |
| return; |
| std::for_each(windows.begin(), windows.end(), &RestoreWindowState); |
| } |
| private: |
| + aura::Window::Windows GetNormalWindows() const { |
| + aura::Window::Windows windows; |
| + const aura::Window::Windows& children = container_->children(); |
| + for (aura::Window::Windows::const_iterator iter = children.begin(); |
| + iter != children.end(); |
| + iter++) { |
| + if ((*iter)->type() == ui::wm::WINDOW_TYPE_NORMAL) |
| + windows.push_back(*iter); |
| + } |
| + return windows; |
| + } |
| + |
| // Computes the transforms for all windows in both the topmost and bottom-most |
| // positions. The transforms are set in the |kWindowOverviewState| property of |
| // the windows. |
| void ComputeTerminalStatesForAllWindows() { |
| - aura::Window::Windows windows = container_->children(); |
| + aura::Window::Windows windows = GetNormalWindows(); |
| size_t window_count = windows.size(); |
| size_t index = 0; |
| const gfx::Size container_size = container_->bounds().size(); |
| @@ -159,7 +171,7 @@ class WindowOverviewModeImpl : public WindowOverviewMode, |
| // Sets the initial position for the windows for the overview mode. |
| void SetInitialWindowStates() { |
| - aura::Window::Windows windows = container_->children(); |
| + aura::Window::Windows windows = GetNormalWindows(); |
| size_t window_count = windows.size(); |
| // The initial overview state of the topmost three windows. |
| const float kInitialProgress[] = { 0.5f, 0.05f, 0.01f }; |
| @@ -222,7 +234,7 @@ class WindowOverviewModeImpl : public WindowOverviewMode, |
| // scrolling up; and positive when scrolling down. |
| void DoScroll(float delta_y) { |
| const float kEpsilon = 1e-3f; |
| - aura::Window::Windows windows = container_->children(); |
| + aura::Window::Windows windows = GetNormalWindows(); |
| float delta_y_p = std::abs(delta_y) / GetScrollableHeight(); |
| if (delta_y < 0) { |
| // Scroll up. Start with the top-most (i.e. behind-most in terms of |