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

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

Issue 2203003003: Get AcceleratorControllerTest working with mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback 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 | « ash/mus/property_util.h ('k') | ash/mus/test/wm_test_helper.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 bool GetRequestedContainer(const ui::Window* window, 75 bool GetRequestedContainer(const ui::Window* window,
76 mojom::Container* container) { 76 mojom::Container* container) {
77 if (!window->HasSharedProperty(mojom::kWindowContainer_Property)) 77 if (!window->HasSharedProperty(mojom::kWindowContainer_Property))
78 return false; 78 return false;
79 79
80 *container = static_cast<mojom::Container>( 80 *container = static_cast<mojom::Container>(
81 window->GetSharedProperty<int32_t>(mojom::kWindowContainer_Property)); 81 window->GetSharedProperty<int32_t>(mojom::kWindowContainer_Property));
82 return true; 82 return true;
83 } 83 }
84 84
85 void SetResizeBehavior(ui::Window::SharedProperties* properties,
86 int32_t resize_behavior) {
87 (*properties)[ui::mojom::WindowManager::kResizeBehavior_Property] =
88 mojo::ConvertTo<std::vector<uint8_t>>(resize_behavior);
89 }
90
85 int32_t GetResizeBehavior(const ui::Window* window) { 91 int32_t GetResizeBehavior(const ui::Window* window) {
86 if (window->HasSharedProperty( 92 if (window->HasSharedProperty(
87 ui::mojom::WindowManager::kResizeBehavior_Property)) { 93 ui::mojom::WindowManager::kResizeBehavior_Property)) {
88 return window->GetSharedProperty<int32_t>( 94 return window->GetSharedProperty<int32_t>(
89 ui::mojom::WindowManager::kResizeBehavior_Property); 95 ui::mojom::WindowManager::kResizeBehavior_Property);
90 } 96 }
91 return ui::mojom::kResizeBehaviorNone; 97 return ui::mojom::kResizeBehaviorNone;
92 } 98 }
93 99
94 void SetRestoreBounds(ui::Window* window, const gfx::Rect& bounds) { 100 void SetRestoreBounds(ui::Window* window, const gfx::Rect& bounds) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 241
236 bool ShouldRemoveStandardFrame(ui::Window* window) { 242 bool ShouldRemoveStandardFrame(ui::Window* window) {
237 return window->HasSharedProperty( 243 return window->HasSharedProperty(
238 ui::mojom::WindowManager::kRemoveStandardFrame_Property) && 244 ui::mojom::WindowManager::kRemoveStandardFrame_Property) &&
239 window->GetSharedProperty<bool>( 245 window->GetSharedProperty<bool>(
240 ui::mojom::WindowManager::kRemoveStandardFrame_Property); 246 ui::mojom::WindowManager::kRemoveStandardFrame_Property);
241 } 247 }
242 248
243 } // namespace mus 249 } // namespace mus
244 } // namespace ash 250 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/property_util.h ('k') | ash/mus/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698