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

Side by Side Diff: services/ui/ws/modal_window_controller.cc

Issue 2229273003: services: 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 unified diff | Download patch
« no previous file with comments | « services/shell/runner/init.cc ('k') | services/ui/ws/server_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/ws/modal_window_controller.h" 5 #include "services/ui/ws/modal_window_controller.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "services/ui/ws/event_dispatcher.h" 8 #include "services/ui/ws/event_dispatcher.h"
9 #include "services/ui/ws/server_window.h" 9 #include "services/ui/ws/server_window.h"
10 #include "services/ui/ws/server_window_drawn_tracker.h" 10 #include "services/ui/ws/server_window_drawn_tracker.h"
(...skipping 27 matching lines...) Expand all
38 38
39 ModalWindowController::~ModalWindowController() { 39 ModalWindowController::~ModalWindowController() {
40 for (auto it = system_modal_windows_.begin(); 40 for (auto it = system_modal_windows_.begin();
41 it != system_modal_windows_.end(); it++) { 41 it != system_modal_windows_.end(); it++) {
42 (*it)->RemoveObserver(this); 42 (*it)->RemoveObserver(this);
43 } 43 }
44 } 44 }
45 45
46 void ModalWindowController::AddSystemModalWindow(ServerWindow* window) { 46 void ModalWindowController::AddSystemModalWindow(ServerWindow* window) {
47 DCHECK(window); 47 DCHECK(window);
48 DCHECK(!ContainsValue(system_modal_windows_, window)); 48 DCHECK(!base::ContainsValue(system_modal_windows_, window));
49 49
50 window->SetModal(); 50 window->SetModal();
51 system_modal_windows_.push_back(window); 51 system_modal_windows_.push_back(window);
52 window_drawn_trackers_.insert(make_pair( 52 window_drawn_trackers_.insert(make_pair(
53 window, base::WrapUnique(new ServerWindowDrawnTracker(window, this)))); 53 window, base::WrapUnique(new ServerWindowDrawnTracker(window, this))));
54 window->AddObserver(this); 54 window->AddObserver(this);
55 55
56 event_dispatcher_->ReleaseCaptureBlockedByModalWindow(window); 56 event_dispatcher_->ReleaseCaptureBlockedByModalWindow(window);
57 } 57 }
58 58
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Move the most recently shown window to the end of the list. 112 // Move the most recently shown window to the end of the list.
113 auto it = std::find(system_modal_windows_.begin(), 113 auto it = std::find(system_modal_windows_.begin(),
114 system_modal_windows_.end(), window); 114 system_modal_windows_.end(), window);
115 DCHECK(it != system_modal_windows_.end()); 115 DCHECK(it != system_modal_windows_.end());
116 system_modal_windows_.splice(system_modal_windows_.end(), 116 system_modal_windows_.splice(system_modal_windows_.end(),
117 system_modal_windows_, it); 117 system_modal_windows_, it);
118 } 118 }
119 119
120 } // namespace ws 120 } // namespace ws
121 } // namespace ui 121 } // namespace ui
OLDNEW
« no previous file with comments | « services/shell/runner/init.cc ('k') | services/ui/ws/server_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698