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

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

Issue 12618014: Switch Next Window Key functionality (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: protect against alt+tab+switch_windows interaction Created 7 years, 9 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 <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
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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 this, file_list)); 878 this, file_list));
879 } 879 }
880 880
881 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete( 881 void WallpaperPrivateGetOfflineWallpaperListFunction::OnComplete(
882 const std::vector<std::string>& file_list) { 882 const std::vector<std::string>& file_list) {
883 ListValue* results = new ListValue(); 883 ListValue* results = new ListValue();
884 results->AppendStrings(file_list); 884 results->AppendStrings(file_list);
885 SetResult(results); 885 SetResult(results);
886 SendResponse(true); 886 SendResponse(true);
887 } 887 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698