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

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: 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/common/shelf/shelf_view.cc » ('j') | ash/common/shelf/shelf_view.cc » ('J')
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 "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/shelf/shelf_item_types.h" 9 #include "ash/common/shelf/shelf_item_types.h"
10 10
(...skipping 18 matching lines...) Expand all
29 29
30 // Called when |shelf|'s auto-hide behavior changes. 30 // Called when |shelf|'s auto-hide behavior changes.
31 virtual void OnShelfAutoHideBehaviorChanged(Shelf* shelf) = 0; 31 virtual void OnShelfAutoHideBehaviorChanged(Shelf* shelf) = 0;
32 32
33 // Called when |shelf|'s auto-hide state changes. 33 // Called when |shelf|'s auto-hide state changes.
34 virtual void OnShelfAutoHideStateChanged(Shelf* shelf) = 0; 34 virtual void OnShelfAutoHideStateChanged(Shelf* shelf) = 0;
35 35
36 // Called when |shelf|'s visibility state is committed. 36 // Called when |shelf|'s visibility state is committed.
37 virtual void OnShelfVisibilityStateChanged(Shelf* shelf) = 0; 37 virtual void OnShelfVisibilityStateChanged(Shelf* shelf) = 0;
38 38
39 // Get the shelf ID from an application ID. 39 // Get the shelf ID from an application ID.
stevenjb 2016/08/29 15:56:30 The comment needs to be updated, but this is kind
Andra Paraschiv 2016/08/30 09:58:24 Added a separate delegate method that includes the
40 virtual ShelfID GetShelfIDForAppID(const std::string& app_id) = 0; 40 virtual ShelfID GetShelfIDForAppID(const std::string& app_id,
41 const std::string& app_shelf_id) = 0;
41 42
42 // Checks whether a mapping exists from the ShelfID |id| to an app id. 43 // Checks whether a mapping exists from the ShelfID |id| to an app id.
43 virtual bool HasShelfIDToAppIDMapping(ShelfID id) const = 0; 44 virtual bool HasShelfIDToAppIDMapping(ShelfID id) const = 0;
44 45
45 // Get the application ID for a given shelf ID. 46 // Get the application ID for a given shelf ID.
46 // |HasShelfIDToAppIDMapping(ShelfID)| should be called first to ensure the 47 // |HasShelfIDToAppIDMapping(ShelfID)| should be called first to ensure the
47 // ShelfID can be successfully mapped to an app id. 48 // ShelfID can be successfully mapped to an app id.
48 virtual const std::string& GetAppIDForShelfID(ShelfID id) = 0; 49 virtual const std::string& GetAppIDForShelfID(ShelfID id) = 0;
49 50
50 // Pins an app with |app_id| to shelf. A running instance will get pinned. 51 // Pins an app with |app_id| to shelf. A running instance will get pinned.
51 // In case there is no running instance a new shelf item is created and 52 // In case there is no running instance a new shelf item is created and
52 // pinned. 53 // pinned.
53 virtual void PinAppWithID(const std::string& app_id) = 0; 54 virtual void PinAppWithID(const std::string& app_id) = 0;
54 55
55 // Check if the app with |app_id_| is pinned to the shelf. 56 // Check if the app with |app_id_| is pinned to the shelf.
56 virtual bool IsAppPinned(const std::string& app_id) = 0; 57 virtual bool IsAppPinned(const std::string& app_id) = 0;
57 58
58 // Unpins app item with |app_id|. 59 // Unpins app item with |app_id|.
59 virtual void UnpinAppWithID(const std::string& app_id) = 0; 60 virtual void UnpinAppWithID(const std::string& app_id) = 0;
60 }; 61 };
61 62
62 } // namespace ash 63 } // namespace ash
63 64
64 #endif // ASH_COMMON_SHELF_SHELF_DELEGATE_H_ 65 #endif // ASH_COMMON_SHELF_SHELF_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/shelf/shelf_view.cc » ('j') | ash/common/shelf/shelf_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698