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

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

Issue 2357143004: mash: Support ShelfWindowWatcher via ShelfItem properties. (Closed)
Patch Set: Address comments. 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') | chrome/browser/ui/ash/launcher/browser_status_monitor.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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 mojom::AshWindowType GetAshWindowType(const ui::Window* window) { 170 mojom::AshWindowType GetAshWindowType(const ui::Window* window) {
171 if (!window->HasSharedProperty(mojom::kAshWindowType_Property)) 171 if (!window->HasSharedProperty(mojom::kAshWindowType_Property))
172 return mojom::AshWindowType::COUNT; 172 return mojom::AshWindowType::COUNT;
173 173
174 return static_cast<mojom::AshWindowType>( 174 return static_cast<mojom::AshWindowType>(
175 window->GetSharedProperty<int32_t>(mojom::kAshWindowType_Property)); 175 window->GetSharedProperty<int32_t>(mojom::kAshWindowType_Property));
176 } 176 }
177 177
178 void SetWindowTitle(ui::Window* window, base::string16 title) {
179 window->SetSharedProperty<base::string16>(
180 ui::mojom::WindowManager::kWindowTitle_Property, title);
181 }
182
178 base::string16 GetWindowTitle(const ui::Window* window) { 183 base::string16 GetWindowTitle(const ui::Window* window) {
179 if (!window->HasSharedProperty( 184 if (!window->HasSharedProperty(
180 ui::mojom::WindowManager::kWindowTitle_Property)) { 185 ui::mojom::WindowManager::kWindowTitle_Property)) {
181 return base::string16(); 186 return base::string16();
182 } 187 }
183 188
184 return window->GetSharedProperty<base::string16>( 189 return window->GetSharedProperty<base::string16>(
185 ui::mojom::WindowManager::kWindowTitle_Property); 190 ui::mojom::WindowManager::kWindowTitle_Property);
186 } 191 }
187 192
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 253
249 bool ShouldRenderParentTitleArea(ui::Window* window) { 254 bool ShouldRenderParentTitleArea(ui::Window* window) {
250 return window->HasSharedProperty( 255 return window->HasSharedProperty(
251 ui::mojom::WindowManager::kRendererParentTitleArea_Property) && 256 ui::mojom::WindowManager::kRendererParentTitleArea_Property) &&
252 window->GetSharedProperty<bool>( 257 window->GetSharedProperty<bool>(
253 ui::mojom::WindowManager::kRendererParentTitleArea_Property); 258 ui::mojom::WindowManager::kRendererParentTitleArea_Property);
254 } 259 }
255 260
256 } // namespace mus 261 } // namespace mus
257 } // namespace ash 262 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/property_util.h ('k') | chrome/browser/ui/ash/launcher/browser_status_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698