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

Unified Diff: ash/common/wm/maximize_mode/maximize_mode_window_manager.cc

Issue 2237433002: ash: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/accelerators/accelerator_router.cc ('k') | ash/display/display_animator_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/maximize_mode/maximize_mode_window_manager.cc
diff --git a/ash/common/wm/maximize_mode/maximize_mode_window_manager.cc b/ash/common/wm/maximize_mode/maximize_mode_window_manager.cc
index 3e2b9625689df0fb0e8e26bee1589d8556d4e0b2..bb97c7d6620c0839f2e64afb25d3b5ea3efe000a 100644
--- a/ash/common/wm/maximize_mode/maximize_mode_window_manager.cc
+++ b/ash/common/wm/maximize_mode/maximize_mode_window_manager.cc
@@ -57,7 +57,8 @@ int MaximizeModeWindowManager::GetNumberOfManagedWindows() {
void MaximizeModeWindowManager::AddWindow(WmWindow* window) {
// Only add the window if it is a direct dependent of a container window
// and not yet tracked.
- if (!ShouldHandleWindow(window) || ContainsKey(window_state_map_, window) ||
+ if (!ShouldHandleWindow(window) ||
+ base::ContainsKey(window_state_map_, window) ||
!IsContainerWindow(window->GetParent())) {
return;
}
@@ -110,11 +111,11 @@ void MaximizeModeWindowManager::OnWindowTreeChanged(
const TreeChangeParams& params) {
// A window can get removed and then re-added by a drag and drop operation.
if (params.new_parent && IsContainerWindow(params.new_parent) &&
- !ContainsKey(window_state_map_, params.target)) {
+ !base::ContainsKey(window_state_map_, params.target)) {
MaximizeAndTrackWindow(params.target);
// When the state got added, the "WM_EVENT_ADDED_TO_WORKSPACE" event got
// already sent and we have to notify our state again.
- if (ContainsKey(window_state_map_, params.target)) {
+ if (base::ContainsKey(window_state_map_, params.target)) {
wm::WMEvent event(wm::WM_EVENT_ADDED_TO_WORKSPACE);
params.target->GetWindowState()->OnWMEvent(&event);
}
@@ -192,7 +193,7 @@ void MaximizeModeWindowManager::MaximizeAndTrackWindow(WmWindow* window) {
if (!ShouldHandleWindow(window))
return;
- DCHECK(!ContainsKey(window_state_map_, window));
+ DCHECK(!base::ContainsKey(window_state_map_, window));
window->AddObserver(this);
// We create and remember a maximize mode state which will attach itself to
@@ -212,7 +213,7 @@ void MaximizeModeWindowManager::ForgetWindow(WmWindow* window) {
// By telling the state object to revert, it will switch back the old
// State object and destroy itself, calling WindowStateDestroyed().
it->second->LeaveMaximizeMode(it->first->GetWindowState());
- DCHECK(!ContainsKey(window_state_map_, window));
+ DCHECK(!base::ContainsKey(window_state_map_, window));
}
bool MaximizeModeWindowManager::ShouldHandleWindow(WmWindow* window) {
@@ -237,7 +238,7 @@ void MaximizeModeWindowManager::AddWindowCreationObservers() {
for (WmWindow* root : WmShell::Get()->GetAllRootWindows()) {
WmWindow* default_container =
root->GetChildByShellWindowId(kShellWindowId_DefaultContainer);
- DCHECK(!ContainsKey(observed_container_windows_, default_container));
+ DCHECK(!base::ContainsKey(observed_container_windows_, default_container));
default_container->AddObserver(this);
observed_container_windows_.insert(default_container);
}
@@ -257,7 +258,7 @@ void MaximizeModeWindowManager::DisplayConfigurationChanged() {
}
bool MaximizeModeWindowManager::IsContainerWindow(WmWindow* window) {
- return ContainsKey(observed_container_windows_, window);
+ return base::ContainsKey(observed_container_windows_, window);
}
void MaximizeModeWindowManager::EnableBackdropBehindTopWindowOnEachDisplay(
« no previous file with comments | « ash/common/accelerators/accelerator_router.cc ('k') | ash/display/display_animator_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698