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

Side by Side Diff: ash/test/test_shelf_delegate.h

Issue 2341643002: Enhance chrome.app.window API for shelf integration with pinning support (cont.) (Closed)
Patch Set: Include AppLauncherId wrapper Created 4 years, 2 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
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_TEST_TEST_SHELF_DELEGATE_H_ 5 #ifndef ASH_TEST_TEST_SHELF_DELEGATE_H_
6 #define ASH_TEST_TEST_SHELF_DELEGATE_H_ 6 #define ASH_TEST_TEST_SHELF_DELEGATE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // WindowObserver implementation 48 // WindowObserver implementation
49 void OnWindowDestroying(aura::Window* window) override; 49 void OnWindowDestroying(aura::Window* window) override;
50 void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override; 50 void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override;
51 51
52 // ShelfDelegate implementation. 52 // ShelfDelegate implementation.
53 ShelfID GetShelfIDForAppID(const std::string& app_id) override; 53 ShelfID GetShelfIDForAppID(const std::string& app_id) override;
54 ShelfID GetShelfIDForAppIDAndLaunchID(const std::string& app_id, 54 ShelfID GetShelfIDForAppIDAndLaunchID(const std::string& app_id,
55 const std::string& launch_id) override; 55 const std::string& launch_id) override;
56 bool HasShelfIDToAppIDMapping(ShelfID id) const override; 56 bool HasShelfIDToAppIDMapping(ShelfID id) const override;
57 const std::string& GetAppIDForShelfID(ShelfID id) override; 57 const std::string& GetAppIDForShelfID(ShelfID id) override;
58 const std::string& GetLaunchIDForShelfID(ShelfID id) override;
58 void PinAppWithID(const std::string& app_id) override; 59 void PinAppWithID(const std::string& app_id) override;
59 bool IsAppPinned(const std::string& app_id) override; 60 bool IsAppPinned(const std::string& app_id) override;
60 void UnpinAppWithID(const std::string& app_id) override; 61 void UnpinAppWithID(const std::string& app_id) override;
61 62
62 private: 63 private:
63 // Adds a mapping from a ShelfID to an app id. 64 // Adds a mapping from a ShelfID to an app id.
64 void AddShelfIDToAppIDMapping(ShelfID shelf_id, const std::string& app_id); 65 void AddShelfIDToAppIDMapping(ShelfID shelf_id, const std::string& app_id);
65 66
66 // Removes the mapping from a ShelfID to an app id. 67 // Removes the mapping from a ShelfID to an app id.
67 void RemoveShelfIDToAppIDMapping(ShelfID shelf_id); 68 void RemoveShelfIDToAppIDMapping(ShelfID shelf_id);
68 69
69 static TestShelfDelegate* instance_; 70 static TestShelfDelegate* instance_;
70 71
71 ShelfModel* model_; 72 ShelfModel* model_;
72 73
73 std::set<std::string> pinned_apps_; 74 std::set<std::string> pinned_apps_;
74 75
75 // Tracks the ShelfID to app id mappings. 76 // Tracks the ShelfID to app id mappings.
76 std::map<ShelfID, std::string> shelf_id_to_app_id_map_; 77 std::map<ShelfID, std::string> shelf_id_to_app_id_map_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(TestShelfDelegate); 79 DISALLOW_COPY_AND_ASSIGN(TestShelfDelegate);
79 }; 80 };
80 81
81 } // namespace test 82 } // namespace test
82 } // namespace ash 83 } // namespace ash
83 84
84 #endif // ASH_TEST_TEST_SHELF_DELEGATE_H_ 85 #endif // ASH_TEST_TEST_SHELF_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698