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

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

Issue 2332393003: mash: Remove shelf util functions; use WmWindow properties. (Closed)
Patch Set: Address comments. 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 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 2d4fae387c885b34bf1c74fd81b40ce8b436c7ba..3ececf48d800737b61343ea1de4ce34996e0a941 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
@@ -6,11 +6,12 @@
#include <vector>
+#include "ash/aura/wm_window_aura.h"
#include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/shelf/shelf_model.h"
#include "ash/common/wm_shell.h"
+#include "ash/common/wm_window_property.h"
#include "ash/resources/grit/ash_resources.h"
-#include "ash/shelf/shelf_util.h"
#include "ash/wm/window_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
@@ -117,15 +118,16 @@ void BrowserShortcutLauncherItemController::UpdateBrowserItemState() {
void BrowserShortcutLauncherItemController::SetShelfIDForBrowserWindowContents(
Browser* browser,
content::WebContents* web_contents) {
- // We need to call SetShelfIDForWindow for V1 applications since they are
+ // We need to set the window ShelfID for V1 applications since they are
// content which might change and as such change the application type.
if (!browser || !IsBrowserFromActiveUser(browser) ||
IsSettingsBrowser(browser))
return;
- ash::SetShelfIDForWindow(
- launcher_controller()->GetShelfIDForWebContents(web_contents),
- browser->window()->GetNativeWindow());
+ ash::WmWindowAura::Get(browser->window()->GetNativeWindow())
+ ->SetIntProperty(
+ ash::WmWindowProperty::SHELF_ID,
+ launcher_controller()->GetShelfIDForWebContents(web_contents));
}
bool BrowserShortcutLauncherItemController::IsOpen() const {

Powered by Google App Engine
This is Rietveld 408576698