OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/wm/window_cycle_controller.h" | 10 #include "ash/wm/window_cycle_controller.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 WindowStateManager() {} | 126 WindowStateManager() {} |
127 | 127 |
128 virtual ~WindowStateManager() { | 128 virtual ~WindowStateManager() { |
129 for (std::vector<aura::Window*>::iterator iter = windows_.begin(); | 129 for (std::vector<aura::Window*>::iterator iter = windows_.begin(); |
130 iter != windows_.end(); ++iter) { | 130 iter != windows_.end(); ++iter) { |
131 (*iter)->RemoveObserver(this); | 131 (*iter)->RemoveObserver(this); |
132 } | 132 } |
133 } | 133 } |
134 | 134 |
135 void BuildWindowListAndMinimizeInactive(aura::Window* active_window) { | 135 void BuildWindowListAndMinimizeInactive(aura::Window* active_window) { |
136 windows_ = ash::WindowCycleController::BuildWindowList(NULL); | 136 windows_ = ash::WindowCycleController::BuildWindowList(NULL, false); |
137 // Remove active window. | 137 // Remove active window. |
138 std::vector<aura::Window*>::iterator last = | 138 std::vector<aura::Window*>::iterator last = |
139 std::remove(windows_.begin(), windows_.end(), active_window); | 139 std::remove(windows_.begin(), windows_.end(), active_window); |
140 // Removes unfocusable windows. | 140 // Removes unfocusable windows. |
141 last = | 141 last = |
142 std::remove_if( | 142 std::remove_if( |
143 windows_.begin(), | 143 windows_.begin(), |
144 last, | 144 last, |
145 std::ptr_fun(ash::wm::IsWindowMinimized)); | 145 std::ptr_fun(ash::wm::IsWindowMinimized)); |
146 windows_.erase(last, windows_.end()); | 146 windows_.erase(last, windows_.end()); |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 this, file_list)); | 885 this, file_list)); |
886 } | 886 } |
887 | 887 |
888 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( | 888 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( |
889 const std::vector<std::string>& file_list) { | 889 const std::vector<std::string>& file_list) { |
890 ListValue* results = new ListValue(); | 890 ListValue* results = new ListValue(); |
891 results->AppendStrings(file_list); | 891 results->AppendStrings(file_list); |
892 SetResult(results); | 892 SetResult(results); |
893 SendResponse(true); | 893 SendResponse(true); |
894 } | 894 } |
OLD | NEW |