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

Side by Side Diff: chrome/browser/ui/ash/property_util.cc

Issue 2514473003: Replace IDR window property use with gfx::ImageSkia icons. (Closed)
Patch Set: Remove TODOs let mash Task Manager and Settings icons temporarily regress. Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "chrome/browser/ui/ash/property_util.h" 5 #include "chrome/browser/ui/ash/property_util.h"
6 6
7 #include "ash/wm/window_properties.h" 7 #include "ash/wm/window_properties.h"
8 #include "chrome/browser/ui/ash/ash_util.h" 8 #include "chrome/browser/ui/ash/ash_util.h"
9 #include "services/ui/public/cpp/property_type_converters.h" 9 #include "services/ui/public/cpp/property_type_converters.h"
10 #include "services/ui/public/cpp/window.h" 10 #include "services/ui/public/cpp/window.h"
11 #include "services/ui/public/cpp/window_property.h" 11 #include "services/ui/public/cpp/window_property.h"
12 #include "services/ui/public/interfaces/window_manager.mojom.h" 12 #include "services/ui/public/interfaces/window_manager.mojom.h"
13 #include "ui/aura/mus/mus_util.h" 13 #include "ui/aura/mus/mus_util.h"
14 14
15 namespace { 15 namespace {
16 16
17 // Get the corresponding ui::Window property key for an aura::Window key. 17 // Get the corresponding ui::Window property key for an aura::Window key.
18 template <typename T> 18 template <typename T>
19 const char* GetMusProperty(const aura::WindowProperty<T>* aura_key) { 19 const char* GetMusProperty(const aura::WindowProperty<T>* aura_key) {
20 if (aura_key == ash::kShelfIconResourceIdKey)
21 return ui::mojom::WindowManager::kShelfIconResourceId_Property;
22 if (aura_key == ash::kShelfItemTypeKey) 20 if (aura_key == ash::kShelfItemTypeKey)
23 return ui::mojom::WindowManager::kShelfItemType_Property; 21 return ui::mojom::WindowManager::kShelfItemType_Property;
24 NOTREACHED(); 22 NOTREACHED();
25 return nullptr; 23 return nullptr;
26 } 24 }
27 25
28 } // namespace 26 } // namespace
29 27
30 namespace property_util { 28 namespace property_util {
31 29
(...skipping 13 matching lines...) Expand all
45 DCHECK(window); 43 DCHECK(window);
46 if (chrome::IsRunningInMash()) { 44 if (chrome::IsRunningInMash()) {
47 aura::GetMusWindow(window)->SetSharedProperty<base::string16>( 45 aura::GetMusWindow(window)->SetSharedProperty<base::string16>(
48 ui::mojom::WindowManager::kWindowTitle_Property, value); 46 ui::mojom::WindowManager::kWindowTitle_Property, value);
49 } else { 47 } else {
50 window->SetTitle(value); 48 window->SetTitle(value);
51 } 49 }
52 } 50 }
53 51
54 } // namespace property_util 52 } // namespace property_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698