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

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

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 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
« no previous file with comments | « ash/common/test/test_shelf_item_delegate.h ('k') | ash/common/test/test_system_tray_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/common/test/test_shelf_item_delegate.h"
6
7 #include "ash/common/wm_window.h"
8 #include "ash/wm/window_util.h"
9
10 namespace ash {
11 namespace test {
12
13 TestShelfItemDelegate::TestShelfItemDelegate(WmWindow* window)
14 : window_(window) {}
15
16 TestShelfItemDelegate::~TestShelfItemDelegate() {}
17
18 ShelfAction TestShelfItemDelegate::ItemSelected(ui::EventType event_type,
19 int event_flags,
20 int64_t display_id,
21 ShelfLaunchSource source) {
22 if (window_) {
23 if (window_->GetType() == ui::wm::WINDOW_TYPE_PANEL)
24 wm::MoveWindowToDisplay(window_->aura_window(), display_id);
25 window_->Show();
26 window_->Activate();
27 return SHELF_ACTION_WINDOW_ACTIVATED;
28 }
29 return SHELF_ACTION_NONE;
30 }
31
32 ShelfAppMenuItemList TestShelfItemDelegate::GetAppMenuItems(int event_flags) {
33 // Return an empty item list to avoid showing an application menu.
34 return ShelfAppMenuItemList();
35 }
36
37 void TestShelfItemDelegate::ExecuteCommand(uint32_t command_id,
38 int event_flags) {
39 // This delegate does not support showing an application menu.
40 NOTIMPLEMENTED();
41 }
42
43 void TestShelfItemDelegate::Close() {}
44
45 } // namespace test
46 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/test/test_shelf_item_delegate.h ('k') | ash/common/test/test_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698