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

Unified Diff: ash/public/cpp/shelf_item_delegate.h

Issue 2860503002: mash: Replace int ShelfIDs with AppLaunchID strings. (Closed)
Patch Set: Fix struct traits typo. Created 3 years, 7 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/public/cpp/shelf_item.h ('k') | ash/public/cpp/shelf_item_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/public/cpp/shelf_item_delegate.h
diff --git a/ash/public/cpp/shelf_item_delegate.h b/ash/public/cpp/shelf_item_delegate.h
index 23775b57caf0cb7f58dfc30c08e03ceaf9115145..7b4dce25d882b37bca816d67b4cd687deb5c79e7 100644
--- a/ash/public/cpp/shelf_item_delegate.h
+++ b/ash/public/cpp/shelf_item_delegate.h
@@ -7,7 +7,6 @@
#include <string>
-#include "ash/public/cpp/app_launch_id.h"
#include "ash/public/cpp/ash_public_export.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/public/interfaces/shelf.mojom.h"
@@ -25,14 +24,13 @@ using MenuItemList = std::vector<mojom::MenuItemPtr>;
// various subclasses that implement the mojo interface.
class ASH_PUBLIC_EXPORT ShelfItemDelegate : public mojom::ShelfItemDelegate {
public:
- explicit ShelfItemDelegate(const AppLaunchId& app_launch_id);
+ explicit ShelfItemDelegate(const ShelfID& shelf_id);
~ShelfItemDelegate() override;
- ShelfID shelf_id() const { return shelf_id_; }
- void set_shelf_id(ShelfID id) { shelf_id_ = id; }
- const AppLaunchId& app_launch_id() const { return app_launch_id_; }
- const std::string& app_id() const { return app_launch_id_.app_id(); }
- const std::string& launch_id() const { return app_launch_id_.launch_id(); }
+ const ShelfID& shelf_id() const { return shelf_id_; }
+ void set_shelf_id(const ShelfID& shelf_id) { shelf_id_ = shelf_id; }
+ const std::string& app_id() const { return shelf_id_.app_id; }
+ const std::string& launch_id() const { return shelf_id_.launch_id; }
bool image_set_by_controller() const { return image_set_by_controller_; }
void set_image_set_by_controller(bool image_set_by_controller) {
@@ -46,14 +44,11 @@ class ASH_PUBLIC_EXPORT ShelfItemDelegate : public mojom::ShelfItemDelegate {
virtual AppWindowLauncherItemController* AsAppWindowLauncherItemController();
private:
- // The app launch id; empty if there is no app associated with the item.
- // Besides the application id, AppLaunchId also contains a launch id, which is
- // an id that can be passed to an app when launched in order to support
- // multiple shelf items per app. This id is used together with the app_id to
- // uniquely identify each shelf item that has the same app_id.
- const AppLaunchId app_launch_id_;
-
- // A unique id assigned by the shelf model for the shelf item.
+ // The shelf id; empty if there is no app associated with the item.
+ // Besides the application id, ShelfID also contains a launch id, which is an
+ // id that can be passed to an app when launched in order to support multiple
+ // shelf items per app. This id is used together with the app_id to uniquely
+ // identify each shelf item that has the same app_id.
ShelfID shelf_id_;
// Set to true if the launcher item image has been set by the controller.
« no previous file with comments | « ash/public/cpp/shelf_item.h ('k') | ash/public/cpp/shelf_item_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698