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

Side by Side Diff: ash/mus/property_util.cc

Issue 2411913003: Converts ash/wm/mru_window_tracker_unittest.cc to use AshTest (Closed)
Patch Set: comment Created 4 years, 2 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 | « ash/mus/property_util.h ('k') | ash/mus/wm/mru_window_tracker_unittest.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 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 "ash/mus/property_util.h" 5 #include "ash/mus/property_util.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "ash/mus/shadow.h" 9 #include "ash/mus/shadow.h"
10 #include "services/ui/public/cpp/property_type_converters.h" 10 #include "services/ui/public/cpp/property_type_converters.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 ui::mojom::WindowManager::kRendererParentTitleArea_Property); 258 ui::mojom::WindowManager::kRendererParentTitleArea_Property);
259 } 259 }
260 260
261 int64_t GetInitialDisplayId(const ui::Window::SharedProperties& properties) { 261 int64_t GetInitialDisplayId(const ui::Window::SharedProperties& properties) {
262 auto iter = 262 auto iter =
263 properties.find(ui::mojom::WindowManager::kInitialDisplayId_Property); 263 properties.find(ui::mojom::WindowManager::kInitialDisplayId_Property);
264 return iter == properties.end() ? display::Display::kInvalidDisplayID 264 return iter == properties.end() ? display::Display::kInvalidDisplayID
265 : mojo::ConvertTo<int64_t>(iter->second); 265 : mojo::ConvertTo<int64_t>(iter->second);
266 } 266 }
267 267
268 void SetExcludeFromMru(ui::Window* window, bool value) {
269 window->SetSharedProperty<bool>(
270 ui::mojom::WindowManager::kExcludeFromMru_Property, value);
271 }
272
273 bool GetExcludeFromMru(const ui::Window* window) {
274 return window->HasSharedProperty(
275 ui::mojom::WindowManager::kExcludeFromMru_Property) &&
276 window->GetSharedProperty<bool>(
277 ui::mojom::WindowManager::kExcludeFromMru_Property);
278 }
279
268 } // namespace mus 280 } // namespace mus
269 } // namespace ash 281 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/property_util.h ('k') | ash/mus/wm/mru_window_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698