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

Unified Diff: ash/shelf/shelf_window_watcher_item_delegate.cc

Issue 2211463002: mash: Move ShelfWindowWatcher[ItemDelegate] to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO comments with bug for WmWindowMus ShelfItemDetails support. Created 4 years, 4 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/shelf/shelf_window_watcher_unittest.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
deleted file mode 100644
index b40783323cc863d5c9867ef72733bbbd7a4ff4c7..0000000000000000000000000000000000000000
--- a/ash/shelf/shelf_window_watcher_item_delegate.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/shelf/shelf_window_watcher_item_delegate.h"
-
-#include "ash/common/wm/window_state.h"
-#include "ash/common/wm_window.h"
-#include "ash/shelf/shelf_util.h"
-#include "ui/events/event.h"
-#include "ui/wm/core/window_animations.h"
-
-namespace ash {
-
-ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate(WmWindow* window)
- : window_(window) {}
-
-ShelfWindowWatcherItemDelegate::~ShelfWindowWatcherItemDelegate() {}
-
-ShelfItemDelegate::PerformedAction ShelfWindowWatcherItemDelegate::ItemSelected(
- const ui::Event& event) {
- wm::WindowState* window_state = window_->GetWindowState();
- if (window_state->IsActive()) {
- if (event.type() & ui::ET_KEY_RELEASED) {
- window_->Animate(::wm::WINDOW_ANIMATION_TYPE_BOUNCE);
- return kNoAction;
- } else {
- window_state->Minimize();
- return kExistingWindowMinimized;
- }
- } else {
- window_state->Activate();
- return kExistingWindowActivated;
- }
-}
-
-base::string16 ShelfWindowWatcherItemDelegate::GetTitle() {
- return window_->GetShelfItemDetails()->title;
-}
-
-ShelfMenuModel* ShelfWindowWatcherItemDelegate::CreateApplicationMenu(
- int event_flags) {
- return nullptr;
-}
-
-bool ShelfWindowWatcherItemDelegate::IsDraggable() {
- return true;
-}
-
-bool ShelfWindowWatcherItemDelegate::CanPin() const {
- return true;
-}
-
-bool ShelfWindowWatcherItemDelegate::ShouldShowTooltip() {
- return true;
-}
-
-void ShelfWindowWatcherItemDelegate::Close() {
- window_->CloseWidget();
-}
-
-} // namespace ash
« no previous file with comments | « ash/shelf/shelf_window_watcher_item_delegate.h ('k') | ash/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698