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

Unified Diff: ash/common/shelf/shelf_window_watcher_item_delegate.cc

Issue 2696073002: Merge ShelfItemDelegate::ItemSelected & LauncherItemDelegate::Activate. (Closed)
Patch Set: Cleanup Created 3 years, 10 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: ash/common/shelf/shelf_window_watcher_item_delegate.cc
diff --git a/ash/common/shelf/shelf_window_watcher_item_delegate.cc b/ash/common/shelf/shelf_window_watcher_item_delegate.cc
index 2ab81c86522e339618e0c311cf4295852a8f4b76..62c8e29a24e0b2dca3350ad934dbbada9201a17d 100644
--- a/ash/common/shelf/shelf_window_watcher_item_delegate.cc
+++ b/ash/common/shelf/shelf_window_watcher_item_delegate.cc
@@ -10,7 +10,8 @@
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/common/wm_window_property.h"
-#include "ui/events/event.h"
+#include "ash/wm/window_util.h"
+#include "ui/events/event_constants.h"
namespace ash {
@@ -33,18 +34,21 @@ ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate(ShelfID id,
ShelfWindowWatcherItemDelegate::~ShelfWindowWatcherItemDelegate() {}
-ShelfItemDelegate::PerformedAction ShelfWindowWatcherItemDelegate::ItemSelected(
- const ui::Event& event) {
+ShelfAction ShelfWindowWatcherItemDelegate::ItemSelected(
+ ui::EventType event_type,
+ int event_flags,
+ int64_t display_id,
+ ShelfLaunchSource source) {
// Move panels attached on another display to the current display.
if (GetShelfItemType(id_) == TYPE_APP_PANEL &&
window_->GetBoolProperty(WmWindowProperty::PANEL_ATTACHED) &&
- window_->MoveToEventRoot(event)) {
+ wm::MoveWindowToDisplay(window_->aura_window(), display_id)) {
window_->Activate();
return kExistingWindowActivated;
}
if (window_->IsActive()) {
- if (event.type() & ui::ET_KEY_RELEASED) {
+ if (event_type == ui::ET_KEY_RELEASED) {
window_->Animate(::wm::WINDOW_ANIMATION_TYPE_BOUNCE);
return kNoAction;
}

Powered by Google App Engine
This is Rietveld 408576698