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

Side by Side Diff: components/mus/ws/focus_controller.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 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
« no previous file with comments | « components/mus/ws/event_dispatcher_unittest.cc ('k') | components/mus/ws/server_window.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/ws/focus_controller.h" 5 #include "components/mus/ws/focus_controller.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "components/mus/public/interfaces/window_manager.mojom.h" 8 #include "components/mus/public/interfaces/window_manager.mojom.h"
9 #include "components/mus/ws/focus_controller_delegate.h" 9 #include "components/mus/ws/focus_controller_delegate.h"
10 #include "components/mus/ws/focus_controller_observer.h" 10 #include "components/mus/ws/focus_controller_observer.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 if (!delegate_->CanHaveActiveChildren(window->parent())) 177 if (!delegate_->CanHaveActiveChildren(window->parent()))
178 return false; 178 return false;
179 179
180 // The window must be drawn, or if it's not drawn, it must be minimized. 180 // The window must be drawn, or if it's not drawn, it must be minimized.
181 if (!window->IsDrawn()) { 181 if (!window->IsDrawn()) {
182 bool is_minimized = false; 182 bool is_minimized = false;
183 const ServerWindow::Properties& props = window->properties(); 183 const ServerWindow::Properties& props = window->properties();
184 if (props.count(mojom::WindowManager::kShowState_Property)) { 184 if (props.count(mojom::WindowManager::kShowState_Property)) {
185 is_minimized = 185 is_minimized =
186 props.find(mojom::WindowManager::kShowState_Property)->second[0] == 186 props.find(mojom::WindowManager::kShowState_Property)->second[0] ==
187 mus::mojom::SHOW_STATE_MINIMIZED; 187 static_cast<int>(mus::mojom::ShowState::MINIMIZED);
188 } 188 }
189 if (!is_minimized) 189 if (!is_minimized)
190 return false; 190 return false;
191 } 191 }
192 192
193 // TODO(sad): If there's a transient modal window, then this cannot be 193 // TODO(sad): If there's a transient modal window, then this cannot be
194 // activated. 194 // activated.
195 return true; 195 return true;
196 } 196 }
197 197
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 } 291 }
292 292
293 void FocusController::OnDrawnStateChanged(ServerWindow* ancestor, 293 void FocusController::OnDrawnStateChanged(ServerWindow* ancestor,
294 ServerWindow* window, 294 ServerWindow* window,
295 bool is_drawn) { 295 bool is_drawn) {
296 DCHECK(false); 296 DCHECK(false);
297 } 297 }
298 298
299 } // namespace ws 299 } // namespace ws
300 } // namespace mus 300 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/event_dispatcher_unittest.cc ('k') | components/mus/ws/server_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698