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

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

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 | « no previous file | ash/shelf/shelf_util.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 #ifndef ASH_SHELF_SHELF_UTIL_H_ 5 #ifndef ASH_SHELF_SHELF_UTIL_H_
6 #define ASH_SHELF_SHELF_UTIL_H_ 6 #define ASH_SHELF_SHELF_UTIL_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shelf/shelf_item_types.h" 9 #include "ash/shelf/shelf_item_types.h"
10 #include "base/strings/string16.h"
10 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
11 12
12 namespace aura { 13 namespace aura {
13 class Window; 14 class Window;
14 } 15 }
15 16
16 namespace ash { 17 namespace ash {
17 18
18 // A property key to store the id of the ShelfItem associated with the window. 19 // A property key to store the id of the ShelfItem associated with the window.
19 extern const aura::WindowProperty<ShelfID>* const kShelfID; 20 extern const aura::WindowProperty<ShelfID>* const kShelfID;
(...skipping 10 matching lines...) Expand all
30 // or 0 if there isn't one. 31 // or 0 if there isn't one.
31 // Note: Window of a tabbed browser will return the |ShelfID| of the 32 // Note: Window of a tabbed browser will return the |ShelfID| of the
32 // currently active tab. 33 // currently active tab.
33 ASH_EXPORT ShelfID GetShelfIDForWindow(const aura::Window* window); 34 ASH_EXPORT ShelfID GetShelfIDForWindow(const aura::Window* window);
34 35
35 // Creates a new ShelfItemDetails instance from |details| and sets it for 36 // Creates a new ShelfItemDetails instance from |details| and sets it for
36 // |window|. 37 // |window|.
37 ASH_EXPORT void SetShelfItemDetailsForWindow(aura::Window* window, 38 ASH_EXPORT void SetShelfItemDetailsForWindow(aura::Window* window,
38 const ShelfItemDetails& details); 39 const ShelfItemDetails& details);
39 40
40 // Creates a new ShelfItemDetails instance with type DIALOG and image id 41 // Creates a new ShelfItemDetails instance with type DIALOG, image id
41 // |image_resource_id| and sets it for |window|. 42 // |image_resource_id|, and title |title|, and sets it for |window|.
42 ASH_EXPORT void SetShelfItemDetailsForDialogWindow(aura::Window* window, 43 ASH_EXPORT void SetShelfItemDetailsForDialogWindow(aura::Window* window,
43 int image_resource_id); 44 int image_resource_id,
45 const base::string16& title);
44 46
45 // Clears ShelfItemDetails for |window|. 47 // Clears ShelfItemDetails for |window|.
46 // If |window| has a ShelfItem by SetShelfItemDetailsForWindow(), it will 48 // If |window| has a ShelfItem by SetShelfItemDetailsForWindow(), it will
47 // be removed. 49 // be removed.
48 ASH_EXPORT void ClearShelfItemDetailsForWindow(aura::Window* window); 50 ASH_EXPORT void ClearShelfItemDetailsForWindow(aura::Window* window);
49 51
50 // Returns ShelfItemDetails for |window| or NULL if it doesn't have. 52 // Returns ShelfItemDetails for |window| or NULL if it doesn't have.
51 // Returned ShelfItemDetails object is owned by the |window|. 53 // Returned ShelfItemDetails object is owned by the |window|.
52 ASH_EXPORT const ShelfItemDetails* GetShelfItemDetailsForWindow( 54 ASH_EXPORT const ShelfItemDetails* GetShelfItemDetailsForWindow(
53 aura::Window* window); 55 aura::Window* window);
54 56
55 } // namespace ash 57 } // namespace ash
56 58
57 #endif // ASH_SHELF_SHELF_UTIL_H_ 59 #endif // ASH_SHELF_SHELF_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698