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

Unified Diff: ash/common/test/test_shelf_delegate.h

Issue 2771663002: mash: Refactor ChromeLauncherController's ShelfDelegate code. (Closed)
Patch Set: Address comments. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/shelf/shelf_delegate.h ('k') | ash/common/test/test_shelf_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/test/test_shelf_delegate.h
diff --git a/ash/common/test/test_shelf_delegate.h b/ash/common/test/test_shelf_delegate.h
index 5e274db60b460490e2f60eb7780b3d0c7981cc39..8bcec8d603b53f16cf760fc9d76a3d7fd603ae96 100644
--- a/ash/common/test/test_shelf_delegate.h
+++ b/ash/common/test/test_shelf_delegate.h
@@ -5,7 +5,6 @@
#ifndef ASH_COMMON_TEST_TEST_SHELF_DELEGATE_H_
#define ASH_COMMON_TEST_TEST_SHELF_DELEGATE_H_
-#include <map>
#include <memory>
#include <set>
#include <string>
@@ -33,14 +32,10 @@ class TestShelfDelegate : public ShelfDelegate, public aura::WindowObserver {
// STATUS_CLOSED.
void AddShelfItem(WmWindow* window);
- // Adds a ShelfItem for the given |window| and adds a mapping from the added
- // ShelfItem's ShelfID to the given |app_id|. The ShelfItem's status will be
- // STATUS_CLOSED.
+ // Adds a ShelfItem for the given |window| and |app_id|. The ShelfItem's
+ // status will be STATUS_CLOSED.
void AddShelfItem(WmWindow* window, const std::string& app_id);
- // Adds a ShelfItem for the given |window| with the specified |status|.
- void AddShelfItem(WmWindow* window, ShelfItemStatus status);
-
// Removes the ShelfItem for the specified |window| and unpins it if it was
// pinned. The |window|'s ShelfID to app id mapping will be removed if it
// exists.
@@ -56,28 +51,18 @@ class TestShelfDelegate : public ShelfDelegate, public aura::WindowObserver {
ShelfID GetShelfIDForAppID(const std::string& app_id) override;
ShelfID GetShelfIDForAppIDAndLaunchID(const std::string& app_id,
const std::string& launch_id) override;
- bool HasShelfIDToAppIDMapping(ShelfID id) const override;
const std::string& GetAppIDForShelfID(ShelfID id) override;
void PinAppWithID(const std::string& app_id) override;
bool IsAppPinned(const std::string& app_id) override;
void UnpinAppWithID(const std::string& app_id) override;
private:
- // Adds a mapping from a ShelfID to an app id.
- void AddShelfIDToAppIDMapping(ShelfID shelf_id, const std::string& app_id);
-
- // Removes the mapping from a ShelfID to an app id.
- void RemoveShelfIDToAppIDMapping(ShelfID shelf_id);
-
static TestShelfDelegate* instance_;
std::unique_ptr<ShelfInitializer> shelf_initializer_;
std::set<std::string> pinned_apps_;
- // Tracks the ShelfID to app id mappings.
- std::map<ShelfID, std::string> shelf_id_to_app_id_map_;
-
DISALLOW_COPY_AND_ASSIGN(TestShelfDelegate);
};
« no previous file with comments | « ash/common/shelf/shelf_delegate.h ('k') | ash/common/test/test_shelf_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698