| 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 <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 void WindowStateManager::BuildWindowListAndMinimizeInactiveForUser( | 211 void WindowStateManager::BuildWindowListAndMinimizeInactiveForUser( |
| 212 const std::string& user_id_hash, aura::Window* active_window) { | 212 const std::string& user_id_hash, aura::Window* active_window) { |
| 213 if (user_id_hash_window_list_map_.find(user_id_hash) == | 213 if (user_id_hash_window_list_map_.find(user_id_hash) == |
| 214 user_id_hash_window_list_map_.end()) { | 214 user_id_hash_window_list_map_.end()) { |
| 215 user_id_hash_window_list_map_[user_id_hash] = std::set<aura::Window*>(); | 215 user_id_hash_window_list_map_[user_id_hash] = std::set<aura::Window*>(); |
| 216 } | 216 } |
| 217 std::set<aura::Window*>* results = | 217 std::set<aura::Window*>* results = |
| 218 &user_id_hash_window_list_map_[user_id_hash]; | 218 &user_id_hash_window_list_map_[user_id_hash]; |
| 219 | 219 |
| 220 std::vector<aura::Window*> windows = ash::WmWindow::ToAuraWindows( | 220 std::vector<aura::Window*> windows = ash::WmWindow::ToAuraWindows( |
| 221 ash::WmShell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal()); | 221 ash::Shell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal()); |
| 222 | 222 |
| 223 for (std::vector<aura::Window*>::iterator iter = windows.begin(); | 223 for (std::vector<aura::Window*>::iterator iter = windows.begin(); |
| 224 iter != windows.end(); ++iter) { | 224 iter != windows.end(); ++iter) { |
| 225 // Ignore active window and minimized windows. | 225 // Ignore active window and minimized windows. |
| 226 if (*iter == active_window || ash::wm::GetWindowState(*iter)->IsMinimized()) | 226 if (*iter == active_window || ash::wm::GetWindowState(*iter)->IsMinimized()) |
| 227 continue; | 227 continue; |
| 228 | 228 |
| 229 if (!(*iter)->HasObserver(this)) | 229 if (!(*iter)->HasObserver(this)) |
| 230 (*iter)->AddObserver(this); | 230 (*iter)->AddObserver(this); |
| 231 | 231 |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 WallpaperPrivateRecordWallpaperUMAFunction::Run() { | 957 WallpaperPrivateRecordWallpaperUMAFunction::Run() { |
| 958 std::unique_ptr<record_wallpaper_uma::Params> params( | 958 std::unique_ptr<record_wallpaper_uma::Params> params( |
| 959 record_wallpaper_uma::Params::Create(*args_)); | 959 record_wallpaper_uma::Params::Create(*args_)); |
| 960 EXTENSION_FUNCTION_VALIDATE(params); | 960 EXTENSION_FUNCTION_VALIDATE(params); |
| 961 | 961 |
| 962 user_manager::User::WallpaperType source = getWallpaperType(params->source); | 962 user_manager::User::WallpaperType source = getWallpaperType(params->source); |
| 963 UMA_HISTOGRAM_ENUMERATION("Ash.Wallpaper.Source", source, | 963 UMA_HISTOGRAM_ENUMERATION("Ash.Wallpaper.Source", source, |
| 964 user_manager::User::WALLPAPER_TYPE_COUNT); | 964 user_manager::User::WALLPAPER_TYPE_COUNT); |
| 965 return RespondNow(NoArguments()); | 965 return RespondNow(NoArguments()); |
| 966 } | 966 } |
| OLD | NEW |