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

Side by Side Diff: ash/shelf/shelf_util.cc

Issue 507003002: Set the shelf icon title explicitly for settings and task manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/shelf/shelf_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shelf/shelf_util.h" 5 #include "ash/shelf/shelf_util.h"
6 6
7 #include "ash/shelf/shelf_constants.h" 7 #include "ash/shelf/shelf_constants.h"
8 #include "ui/aura/window_property.h" 8 #include "ui/aura/window_property.h"
9 9
10 DECLARE_WINDOW_PROPERTY_TYPE(ash::ShelfID); 10 DECLARE_WINDOW_PROPERTY_TYPE(ash::ShelfID);
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 void SetShelfItemDetailsForWindow(aura::Window* window, 35 void SetShelfItemDetailsForWindow(aura::Window* window,
36 const ShelfItemDetails& details) { 36 const ShelfItemDetails& details) {
37 // |item_details| is owned by |window|. 37 // |item_details| is owned by |window|.
38 ShelfItemDetails* item_details = new ShelfItemDetails(details); 38 ShelfItemDetails* item_details = new ShelfItemDetails(details);
39 window->SetProperty(kShelfItemDetailsKey, item_details); 39 window->SetProperty(kShelfItemDetailsKey, item_details);
40 } 40 }
41 41
42 void SetShelfItemDetailsForDialogWindow(aura::Window* window, 42 void SetShelfItemDetailsForDialogWindow(aura::Window* window,
43 int image_resource_id) { 43 int image_resource_id,
44 const base::string16& title) {
44 // |item_details| is owned by |window|. 45 // |item_details| is owned by |window|.
45 ShelfItemDetails* item_details = new ShelfItemDetails; 46 ShelfItemDetails* item_details = new ShelfItemDetails;
46 item_details->type = TYPE_DIALOG; 47 item_details->type = TYPE_DIALOG;
47 item_details->image_resource_id = image_resource_id; 48 item_details->image_resource_id = image_resource_id;
48 item_details->title = window->title(); 49 item_details->title = title;
49 window->SetProperty(kShelfItemDetailsKey, item_details); 50 window->SetProperty(kShelfItemDetailsKey, item_details);
50 } 51 }
51 52
52 void ClearShelfItemDetailsForWindow(aura::Window* window) { 53 void ClearShelfItemDetailsForWindow(aura::Window* window) {
53 window->ClearProperty(kShelfItemDetailsKey); 54 window->ClearProperty(kShelfItemDetailsKey);
54 } 55 }
55 56
56 const ShelfItemDetails* GetShelfItemDetailsForWindow( 57 const ShelfItemDetails* GetShelfItemDetailsForWindow(
57 aura::Window* window) { 58 aura::Window* window) {
58 return window->GetProperty(kShelfItemDetailsKey); 59 return window->GetProperty(kShelfItemDetailsKey);
59 } 60 }
60 61
61 } // namespace ash 62 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_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