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

Side by Side Diff: chrome/browser/chromeos/extensions/wallpaper_private_api.cc

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback Created 3 years, 11 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 (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>
11 #include <utility> 11 #include <utility>
12 #include <vector> 12 #include <vector>
13 13
14 #include "ash/aura/wm_window_aura.h"
15 #include "ash/common/wm/mru_window_tracker.h" 14 #include "ash/common/wm/mru_window_tracker.h"
16 #include "ash/common/wm/window_state.h" 15 #include "ash/common/wm/window_state.h"
17 #include "ash/common/wm_shell.h" 16 #include "ash/common/wm_shell.h"
17 #include "ash/common/wm_window.h"
18 #include "ash/shell.h" 18 #include "ash/shell.h"
19 #include "ash/wm/window_state_aura.h" 19 #include "ash/wm/window_state_aura.h"
20 #include "ash/wm/window_util.h" 20 #include "ash/wm/window_util.h"
21 #include "base/command_line.h" 21 #include "base/command_line.h"
22 #include "base/files/file_enumerator.h" 22 #include "base/files/file_enumerator.h"
23 #include "base/files/file_util.h" 23 #include "base/files/file_util.h"
24 #include "base/macros.h" 24 #include "base/macros.h"
25 #include "base/memory/ptr_util.h" 25 #include "base/memory/ptr_util.h"
26 #include "base/memory/ref_counted_memory.h" 26 #include "base/memory/ref_counted_memory.h"
27 #include "base/metrics/histogram_macros.h" 27 #include "base/metrics/histogram_macros.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
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::WmWindowAura::ToAuraWindows( 220 std::vector<aura::Window*> windows = ash::WmWindow::ToAuraWindows(
221 ash::WmShell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal()); 221 ash::WmShell::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);
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 WallpaperPrivateRecordWallpaperUMAFunction::Run() { 969 WallpaperPrivateRecordWallpaperUMAFunction::Run() {
970 std::unique_ptr<record_wallpaper_uma::Params> params( 970 std::unique_ptr<record_wallpaper_uma::Params> params(
971 record_wallpaper_uma::Params::Create(*args_)); 971 record_wallpaper_uma::Params::Create(*args_));
972 EXTENSION_FUNCTION_VALIDATE(params); 972 EXTENSION_FUNCTION_VALIDATE(params);
973 973
974 user_manager::User::WallpaperType source = getWallpaperType(params->source); 974 user_manager::User::WallpaperType source = getWallpaperType(params->source);
975 UMA_HISTOGRAM_ENUMERATION("Ash.Wallpaper.Source", source, 975 UMA_HISTOGRAM_ENUMERATION("Ash.Wallpaper.Source", source,
976 user_manager::User::WALLPAPER_TYPE_COUNT); 976 user_manager::User::WALLPAPER_TYPE_COUNT);
977 return RespondNow(NoArguments()); 977 return RespondNow(NoArguments());
978 } 978 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698