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

Unified Diff: ash/mus/top_level_window_factory.cc

Issue 2715243012: Renames kWindowIgnoredByShelf_Property to ..._InitProperty (Closed)
Patch Set: init Created 3 years, 10 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 | « no previous file | ash/mus/window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/top_level_window_factory.cc
diff --git a/ash/mus/top_level_window_factory.cc b/ash/mus/top_level_window_factory.cc
index aab339df3e63de62089507f8693a08ca6be69b30..602d0c31ae0100e46004804ef38be99979014592 100644
--- a/ash/mus/top_level_window_factory.cc
+++ b/ash/mus/top_level_window_factory.cc
@@ -207,25 +207,28 @@ aura::Window* CreateAndParentTopLevelWindow(
aura::Window* window = CreateAndParentTopLevelWindowInRoot(
window_manager, root_window_controller, window_type, properties);
DisconnectedAppHandler::Create(window);
- if (properties->count(
- ui::mojom::WindowManager::kWindowIgnoredByShelf_Property)) {
+
+ auto ignored_by_shelf_iter = properties->find(
+ ui::mojom::WindowManager::kWindowIgnoredByShelf_InitProperty);
+ if (ignored_by_shelf_iter != properties->end()) {
wm::WindowState* window_state = WmWindow::Get(window)->GetWindowState();
- window_state->set_ignored_by_shelf(mojo::ConvertTo<bool>(
- (*properties)
- [ui::mojom::WindowManager::kWindowIgnoredByShelf_Property]));
+ window_state->set_ignored_by_shelf(
+ mojo::ConvertTo<bool>(ignored_by_shelf_iter->second));
// No need to persist this value.
- properties->erase(ui::mojom::WindowManager::kWindowIgnoredByShelf_Property);
+ properties->erase(ignored_by_shelf_iter);
}
- if (properties->count(ui::mojom::WindowManager::kFocusable_InitProperty)) {
- bool can_focus = mojo::ConvertTo<bool>(
- (*properties)[ui::mojom::WindowManager::kFocusable_InitProperty]);
+
+ auto focusable_iter =
+ properties->find(ui::mojom::WindowManager::kFocusable_InitProperty);
+ if (focusable_iter != properties->end()) {
+ bool can_focus = mojo::ConvertTo<bool>(focusable_iter->second);
window_manager->window_tree_client()->SetCanFocus(window, can_focus);
NonClientFrameController* non_client_frame_controller =
NonClientFrameController::Get(window);
if (non_client_frame_controller)
non_client_frame_controller->set_can_activate(can_focus);
// No need to persist this value.
- properties->erase(ui::mojom::WindowManager::kFocusable_InitProperty);
+ properties->erase(focusable_iter);
}
return window;
}
« no previous file with comments | « no previous file | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698