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

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

Issue 97173003: ash: Rename more Launcher classes to Shelf*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: link chrome 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_launcher_item_delegate.h ('k') | ash/test/test_shelf_item_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/test/test_launcher_item_delegate.h"
6
7 #include "ash/wm/window_util.h"
8 #include "ui/aura/window.h"
9
10 namespace ash {
11 namespace test {
12
13 TestLauncherItemDelegate::TestLauncherItemDelegate(aura::Window* window)
14 : window_(window) {
15 }
16
17 TestLauncherItemDelegate::~TestLauncherItemDelegate() {
18 }
19
20 bool TestLauncherItemDelegate::ItemSelected(const ui::Event& event) {
21 if (window_) {
22 if (window_->type() == aura::client::WINDOW_TYPE_PANEL)
23 ash::wm::MoveWindowToEventRoot(window_, event);
24 window_->Show();
25 ash::wm::ActivateWindow(window_);
26 }
27 return false;
28 }
29
30 base::string16 TestLauncherItemDelegate::GetTitle() {
31 return window_ ? window_->title() : base::string16();
32 }
33
34 ui::MenuModel* TestLauncherItemDelegate::CreateContextMenu(
35 aura::Window* root_window) {
36 return NULL;
37 }
38
39 ash::LauncherMenuModel* TestLauncherItemDelegate::CreateApplicationMenu(
40 int event_flags) {
41 return NULL;
42 }
43
44 bool TestLauncherItemDelegate::IsDraggable() {
45 return true;
46 }
47
48 bool TestLauncherItemDelegate::ShouldShowTooltip() {
49 return true;
50 }
51
52 } // namespace test
53 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_launcher_item_delegate.h ('k') | ash/test/test_shelf_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698