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

Side by Side Diff: ash/test/test_shelf_item_delegate.cc

Issue 115153002: wm: public window_types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ozone deps 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/test/test_shelf_delegate.cc ('k') | ash/wm/always_on_top_controller.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/test/test_shelf_item_delegate.h" 5 #include "ash/test/test_shelf_item_delegate.h"
6 6
7 #include "ash/wm/window_util.h" 7 #include "ash/wm/window_util.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 9
10 namespace ash { 10 namespace ash {
11 namespace test { 11 namespace test {
12 12
13 TestShelfItemDelegate::TestShelfItemDelegate(aura::Window* window) 13 TestShelfItemDelegate::TestShelfItemDelegate(aura::Window* window)
14 : window_(window) { 14 : window_(window) {
15 } 15 }
16 16
17 TestShelfItemDelegate::~TestShelfItemDelegate() { 17 TestShelfItemDelegate::~TestShelfItemDelegate() {
18 } 18 }
19 19
20 bool TestShelfItemDelegate::ItemSelected(const ui::Event& event) { 20 bool TestShelfItemDelegate::ItemSelected(const ui::Event& event) {
21 if (window_) { 21 if (window_) {
22 if (window_->type() == aura::client::WINDOW_TYPE_PANEL) 22 if (window_->type() == ui::wm::WINDOW_TYPE_PANEL)
23 wm::MoveWindowToEventRoot(window_, event); 23 wm::MoveWindowToEventRoot(window_, event);
24 window_->Show(); 24 window_->Show();
25 wm::ActivateWindow(window_); 25 wm::ActivateWindow(window_);
26 } 26 }
27 return false; 27 return false;
28 } 28 }
29 29
30 base::string16 TestShelfItemDelegate::GetTitle() { 30 base::string16 TestShelfItemDelegate::GetTitle() {
31 return window_ ? window_->title() : base::string16(); 31 return window_ ? window_->title() : base::string16();
32 } 32 }
(...skipping 10 matching lines...) Expand all
43 bool TestShelfItemDelegate::IsDraggable() { 43 bool TestShelfItemDelegate::IsDraggable() {
44 return true; 44 return true;
45 } 45 }
46 46
47 bool TestShelfItemDelegate::ShouldShowTooltip() { 47 bool TestShelfItemDelegate::ShouldShowTooltip() {
48 return true; 48 return true;
49 } 49 }
50 50
51 } // namespace test 51 } // namespace test
52 } // namespace ash 52 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_shelf_delegate.cc ('k') | ash/wm/always_on_top_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698