| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 WindowStateManager() {} | 127 WindowStateManager() {} |
| 128 | 128 |
| 129 virtual ~WindowStateManager() { | 129 virtual ~WindowStateManager() { |
| 130 for (std::vector<aura::Window*>::iterator iter = windows_.begin(); | 130 for (std::vector<aura::Window*>::iterator iter = windows_.begin(); |
| 131 iter != windows_.end(); ++iter) { | 131 iter != windows_.end(); ++iter) { |
| 132 (*iter)->RemoveObserver(this); | 132 (*iter)->RemoveObserver(this); |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 | 135 |
| 136 void BuildWindowListAndMinimizeInactive(aura::Window* active_window) { | 136 void BuildWindowListAndMinimizeInactive(aura::Window* active_window) { |
| 137 windows_ = ash::WindowCycleController::BuildWindowList(NULL); | 137 windows_ = ash::WindowCycleController::BuildWindowList(NULL, false); |
| 138 // Remove active window. | 138 // Remove active window. |
| 139 std::vector<aura::Window*>::iterator last = | 139 std::vector<aura::Window*>::iterator last = |
| 140 std::remove(windows_.begin(), windows_.end(), active_window); | 140 std::remove(windows_.begin(), windows_.end(), active_window); |
| 141 // Removes unfocusable windows. | 141 // Removes unfocusable windows. |
| 142 last = | 142 last = |
| 143 std::remove_if( | 143 std::remove_if( |
| 144 windows_.begin(), | 144 windows_.begin(), |
| 145 last, | 145 last, |
| 146 std::ptr_fun(ash::wm::IsWindowMinimized)); | 146 std::ptr_fun(ash::wm::IsWindowMinimized)); |
| 147 windows_.erase(last, windows_.end()); | 147 windows_.erase(last, windows_.end()); |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 this, file_list)); | 909 this, file_list)); |
| 910 } | 910 } |
| 911 | 911 |
| 912 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( | 912 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( |
| 913 const std::vector<std::string>& file_list) { | 913 const std::vector<std::string>& file_list) { |
| 914 ListValue* results = new ListValue(); | 914 ListValue* results = new ListValue(); |
| 915 results->AppendStrings(file_list); | 915 results->AppendStrings(file_list); |
| 916 SetResult(results); | 916 SetResult(results); |
| 917 SendResponse(true); | 917 SendResponse(true); |
| 918 } | 918 } |
| OLD | NEW |