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

Unified Diff: chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc

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
Index: chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
index 6a00eb3dc87d573f284f2e607d423362b75767b5..a933c3c773542b92969406c9f33f662a11daa743 100644
--- a/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
+++ b/chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controller.cc
@@ -7,9 +7,9 @@
#include <limits>
#include <vector>
+#include "ash/public/cpp/window_properties.h"
#include "ash/resources/grit/ash_resources.h"
#include "ash/shelf/shelf_model.h"
-#include "ash/wm/window_properties.h"
#include "ash/wm_window.h"
#include "base/memory/ptr_util.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -105,7 +105,7 @@ base::string16 GetBrowserListTitle(content::WebContents* web_contents) {
BrowserShortcutLauncherItemController::BrowserShortcutLauncherItemController(
ash::ShelfModel* shelf_model)
- : ash::ShelfItemDelegate(ash::AppLaunchId(extension_misc::kChromeAppId)),
+ : ash::ShelfItemDelegate(ash::ShelfID(extension_misc::kChromeAppId)),
shelf_model_(shelf_model) {
// Tag all open browser windows with the appropriate shelf id property. This
// associates each window with the shelf item for the active web contents.
@@ -174,8 +174,9 @@ void BrowserShortcutLauncherItemController::SetShelfIDForBrowserWindowContents(
browser->window()->GetNativeWindow()->SetProperty(
ash::kShelfIDKey,
- ChromeLauncherController::instance()->GetShelfIDForWebContents(
- web_contents));
+ new ash::ShelfID(
+ ChromeLauncherController::instance()->GetShelfIDForWebContents(
+ web_contents)));
}
void BrowserShortcutLauncherItemController::ItemSelected(
@@ -359,9 +360,10 @@ bool BrowserShortcutLauncherItemController::IsBrowserRepresentedInBrowserList(
// v1 App popup windows with a valid app id have their own icon.
if (browser->is_app() && browser->is_type_popup() &&
- shelf_model_->GetShelfIDForAppID(
- web_app::GetExtensionIdFromApplicationName(browser->app_name())) !=
- ash::kInvalidShelfID) {
+ !shelf_model_
+ ->GetShelfIDForAppID(
+ web_app::GetExtensionIdFromApplicationName(browser->app_name()))
+ .IsNull()) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698