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

Side by Side Diff: ash/shell/window_watcher_shelf_item_delegate.cc

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/shell/window_watcher.cc ('k') | ash/shell_unittest.cc » ('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/shell/window_watcher_shelf_item_delegate.h" 5 #include "ash/shell/window_watcher_shelf_item_delegate.h"
6 6
7 #include "ash/shell/window_watcher.h" 7 #include "ash/shell/window_watcher.h"
8 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 10
11 namespace ash { 11 namespace ash {
12 namespace shell { 12 namespace shell {
13 13
14 WindowWatcherShelfItemDelegate::WindowWatcherShelfItemDelegate( 14 WindowWatcherShelfItemDelegate::WindowWatcherShelfItemDelegate(
15 LauncherID id, 15 LauncherID id,
16 WindowWatcher* watcher) 16 WindowWatcher* watcher)
17 : id_(id), watcher_(watcher) { 17 : id_(id), watcher_(watcher) {
18 DCHECK_GT(id_, 0); 18 DCHECK_GT(id_, 0);
19 DCHECK(watcher_); 19 DCHECK(watcher_);
20 } 20 }
21 21
22 WindowWatcherShelfItemDelegate::~WindowWatcherShelfItemDelegate() { 22 WindowWatcherShelfItemDelegate::~WindowWatcherShelfItemDelegate() {
23 } 23 }
24 24
25 bool WindowWatcherShelfItemDelegate::ItemSelected(const ui::Event& event) { 25 bool WindowWatcherShelfItemDelegate::ItemSelected(const ui::Event& event) {
26 aura::Window* window = watcher_->GetWindowByID(id_); 26 aura::Window* window = watcher_->GetWindowByID(id_);
27 if (window->type() == aura::client::WINDOW_TYPE_PANEL) 27 if (window->type() == ui::wm::WINDOW_TYPE_PANEL)
Ben Goodger (Google) 2013/12/18 06:08:12 how about just "wm::" ?
tfarina 2013/12/18 12:45:49 Initially I went with just "wm::", but it caused c
28 wm::MoveWindowToEventRoot(window, event); 28 wm::MoveWindowToEventRoot(window, event);
29 window->Show(); 29 window->Show();
30 wm::ActivateWindow(window); 30 wm::ActivateWindow(window);
31 return false; 31 return false;
32 } 32 }
33 33
34 base::string16 WindowWatcherShelfItemDelegate::GetTitle() { 34 base::string16 WindowWatcherShelfItemDelegate::GetTitle() {
35 return watcher_->GetWindowByID(id_)->title(); 35 return watcher_->GetWindowByID(id_)->title();
36 } 36 }
37 37
(...skipping 10 matching lines...) Expand all
48 bool WindowWatcherShelfItemDelegate::IsDraggable() { 48 bool WindowWatcherShelfItemDelegate::IsDraggable() {
49 return true; 49 return true;
50 } 50 }
51 51
52 bool WindowWatcherShelfItemDelegate::ShouldShowTooltip() { 52 bool WindowWatcherShelfItemDelegate::ShouldShowTooltip() {
53 return true; 53 return true;
54 } 54 }
55 55
56 } // namespace shell 56 } // namespace shell
57 } // namespace ash 57 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/window_watcher.cc ('k') | ash/shell_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698