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

Side by Side Diff: ash/common/shelf/shelf_delegate.h

Issue 2290603002: Enhance chrome.app.window API for shelf integration with pinning support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: LauncherItemController Unit Tests Fix after Rebase Created 4 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/mus/shelf_delegate_mus.h » ('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_COMMON_SHELF_SHELF_DELEGATE_H_ 5 #ifndef ASH_COMMON_SHELF_SHELF_DELEGATE_H_
6 #define ASH_COMMON_SHELF_SHELF_DELEGATE_H_ 6 #define ASH_COMMON_SHELF_SHELF_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 24 matching lines...) Expand all
35 35
36 // Called when |shelf|'s auto-hide state changes. 36 // Called when |shelf|'s auto-hide state changes.
37 virtual void OnShelfAutoHideStateChanged(WmShelf* shelf) = 0; 37 virtual void OnShelfAutoHideStateChanged(WmShelf* shelf) = 0;
38 38
39 // Called when |shelf|'s visibility state is committed. 39 // Called when |shelf|'s visibility state is committed.
40 virtual void OnShelfVisibilityStateChanged(WmShelf* shelf) = 0; 40 virtual void OnShelfVisibilityStateChanged(WmShelf* shelf) = 0;
41 41
42 // Get the shelf ID from an application ID. 42 // Get the shelf ID from an application ID.
43 virtual ShelfID GetShelfIDForAppID(const std::string& app_id) = 0; 43 virtual ShelfID GetShelfIDForAppID(const std::string& app_id) = 0;
44 44
45 // Get the shelf ID from an application ID and a launch ID.
46 // The launch ID can be passed to an app when launched in order to support
47 // multiple shelf items per app. This id is used together with the app_id to
48 // uniquely identify each shelf item that has the same app_id.
49 // For example, a single virtualization app might want to show different
50 // shelf icons for different remote apps.
51 virtual ShelfID GetShelfIDForAppIDAndLaunchID(
52 const std::string& app_id,
53 const std::string& launch_id) = 0;
54
45 // Checks whether a mapping exists from the ShelfID |id| to an app id. 55 // Checks whether a mapping exists from the ShelfID |id| to an app id.
46 virtual bool HasShelfIDToAppIDMapping(ShelfID id) const = 0; 56 virtual bool HasShelfIDToAppIDMapping(ShelfID id) const = 0;
47 57
48 // Get the application ID for a given shelf ID. 58 // Get the application ID for a given shelf ID.
49 // |HasShelfIDToAppIDMapping(ShelfID)| should be called first to ensure the 59 // |HasShelfIDToAppIDMapping(ShelfID)| should be called first to ensure the
50 // ShelfID can be successfully mapped to an app id. 60 // ShelfID can be successfully mapped to an app id.
51 virtual const std::string& GetAppIDForShelfID(ShelfID id) = 0; 61 virtual const std::string& GetAppIDForShelfID(ShelfID id) = 0;
52 62
53 // Pins an app with |app_id| to shelf. A running instance will get pinned. 63 // Pins an app with |app_id| to shelf. A running instance will get pinned.
54 // In case there is no running instance a new shelf item is created and 64 // In case there is no running instance a new shelf item is created and
55 // pinned. 65 // pinned.
56 virtual void PinAppWithID(const std::string& app_id) = 0; 66 virtual void PinAppWithID(const std::string& app_id) = 0;
57 67
58 // Check if the app with |app_id_| is pinned to the shelf. 68 // Check if the app with |app_id_| is pinned to the shelf.
59 virtual bool IsAppPinned(const std::string& app_id) = 0; 69 virtual bool IsAppPinned(const std::string& app_id) = 0;
60 70
61 // Unpins app item with |app_id|. 71 // Unpins app item with |app_id|.
62 virtual void UnpinAppWithID(const std::string& app_id) = 0; 72 virtual void UnpinAppWithID(const std::string& app_id) = 0;
63 }; 73 };
64 74
65 } // namespace ash 75 } // namespace ash
66 76
67 #endif // ASH_COMMON_SHELF_SHELF_DELEGATE_H_ 77 #endif // ASH_COMMON_SHELF_SHELF_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/mus/shelf_delegate_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698