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

Side by Side Diff: ash/shelf/shelf_window_watcher_item_delegate.cc

Issue 196063002: Move wm/core to wm namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shelf/shelf_window_watcher_item_delegate.h" 5 #include "ash/shelf/shelf_window_watcher_item_delegate.h"
6 6
7 #include "ash/shelf/shelf_model.h" 7 #include "ash/shelf/shelf_model.h"
8 #include "ash/shelf/shelf_util.h" 8 #include "ash/shelf/shelf_util.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 27
28 void ShelfWindowWatcherItemDelegate::Close() { 28 void ShelfWindowWatcherItemDelegate::Close() {
29 views::Widget::GetWidgetForNativeWindow(window_)->Close(); 29 views::Widget::GetWidgetForNativeWindow(window_)->Close();
30 } 30 }
31 31
32 bool ShelfWindowWatcherItemDelegate::ItemSelected(const ui::Event& event) { 32 bool ShelfWindowWatcherItemDelegate::ItemSelected(const ui::Event& event) {
33 wm::WindowState* window_state = wm::GetWindowState(window_); 33 wm::WindowState* window_state = wm::GetWindowState(window_);
34 if (window_state->IsActive()) { 34 if (window_state->IsActive()) {
35 if (event.type() & ui::ET_KEY_RELEASED) { 35 if (event.type() & ui::ET_KEY_RELEASED) {
36 views::corewm::AnimateWindow(window_, 36 ::wm::AnimateWindow(window_, ::wm::WINDOW_ANIMATION_TYPE_BOUNCE);
37 views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE);
38 } else { 37 } else {
39 window_state->Minimize(); 38 window_state->Minimize();
40 } 39 }
41 } else { 40 } else {
42 window_state->Activate(); 41 window_state->Activate();
43 } 42 }
44 43
45 return false; 44 return false;
46 } 45 }
47 46
(...skipping 17 matching lines...) Expand all
65 bool ShelfWindowWatcherItemDelegate::IsDraggable() { 64 bool ShelfWindowWatcherItemDelegate::IsDraggable() {
66 return true; 65 return true;
67 } 66 }
68 67
69 bool ShelfWindowWatcherItemDelegate::ShouldShowTooltip() { 68 bool ShelfWindowWatcherItemDelegate::ShouldShowTooltip() {
70 return true; 69 return true;
71 } 70 }
72 71
73 } // namespace internal 72 } // namespace internal
74 } // namespace ash 73 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_widget.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698