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

Unified Diff: ash/shelf/shelf_window_watcher_item_delegate.cc

Issue 2908793002: [mus+ash] Removes WmWindow from ash/wm/overview and ash/wm/workspace (Closed)
Patch Set: 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/shelf/shelf_window_watcher_item_delegate.h ('k') | ash/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_window_watcher_item_delegate.cc
diff --git a/ash/shelf/shelf_window_watcher_item_delegate.cc b/ash/shelf/shelf_window_watcher_item_delegate.cc
index 001b25f187721c4be75e33e27fd677f56c67fa09..c10440bd9789d77d0df23eb8720df73a4594cd0d 100644
--- a/ash/shelf/shelf_window_watcher_item_delegate.cc
+++ b/ash/shelf/shelf_window_watcher_item_delegate.cc
@@ -12,9 +12,10 @@
#include "ash/shell.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
-#include "ash/wm_window.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/window.h"
#include "ui/events/event_constants.h"
+#include "ui/wm/core/window_animations.h"
namespace ash {
@@ -30,7 +31,7 @@ ShelfItemType GetShelfItemType(const ShelfID& id) {
ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate(
const ShelfID& id,
- WmWindow* window)
+ aura::Window* window)
: ShelfItemDelegate(id), window_(window) {
DCHECK(!id.IsNull());
DCHECK(window_);
@@ -45,24 +46,24 @@ void ShelfWindowWatcherItemDelegate::ItemSelected(
ItemSelectedCallback callback) {
// Move panels attached on another display to the current display.
if (GetShelfItemType(shelf_id()) == TYPE_APP_PANEL &&
- window_->aura_window()->GetProperty(kPanelAttachedKey) &&
- wm::MoveWindowToDisplay(window_->aura_window(), display_id)) {
- window_->Activate();
+ window_->GetProperty(kPanelAttachedKey) &&
+ wm::MoveWindowToDisplay(window_, display_id)) {
+ wm::ActivateWindow(window_);
std::move(callback).Run(SHELF_ACTION_WINDOW_ACTIVATED, base::nullopt);
return;
}
- if (window_->IsActive()) {
+ if (wm::IsActiveWindow(window_)) {
if (event && event->type() == ui::ET_KEY_RELEASED) {
- window_->Animate(::wm::WINDOW_ANIMATION_TYPE_BOUNCE);
+ ::wm::AnimateWindow(window_, ::wm::WINDOW_ANIMATION_TYPE_BOUNCE);
std::move(callback).Run(SHELF_ACTION_NONE, base::nullopt);
return;
}
- window_->Minimize();
+ window_->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
std::move(callback).Run(SHELF_ACTION_WINDOW_MINIMIZED, base::nullopt);
return;
}
- window_->Activate();
+ wm::ActivateWindow(window_);
std::move(callback).Run(SHELF_ACTION_WINDOW_ACTIVATED, base::nullopt);
}
@@ -70,7 +71,7 @@ void ShelfWindowWatcherItemDelegate::ExecuteCommand(uint32_t command_id,
int32_t event_flags) {}
void ShelfWindowWatcherItemDelegate::Close() {
- window_->CloseWidget();
+ wm::CloseWidgetForWindow(window_);
}
} // namespace ash
« no previous file with comments | « ash/shelf/shelf_window_watcher_item_delegate.h ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698