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

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

Issue 2671923002: mash: Cleanup ash shelf application menu code. (Closed)
Patch Set: Fix tests; cleanup. Created 3 years, 10 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
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/common/test/test_shelf_item_delegate.h" 5 #include "ash/common/test/test_shelf_item_delegate.h"
6 6
7 #include "ash/common/wm_window.h" 7 #include "ash/common/wm_window.h"
8 8
9 namespace ash { 9 namespace ash {
10 namespace test { 10 namespace test {
11 11
12 TestShelfItemDelegate::TestShelfItemDelegate(WmWindow* window) 12 TestShelfItemDelegate::TestShelfItemDelegate(WmWindow* window)
13 : window_(window) {} 13 : window_(window) {}
14 14
15 TestShelfItemDelegate::~TestShelfItemDelegate() {} 15 TestShelfItemDelegate::~TestShelfItemDelegate() {}
16 16
17 ShelfItemDelegate::PerformedAction TestShelfItemDelegate::ItemSelected( 17 ShelfItemDelegate::PerformedAction TestShelfItemDelegate::ItemSelected(
18 const ui::Event& event) { 18 const ui::Event& event) {
19 if (window_) { 19 if (window_) {
20 if (window_->GetType() == ui::wm::WINDOW_TYPE_PANEL) 20 if (window_->GetType() == ui::wm::WINDOW_TYPE_PANEL)
21 window_->MoveToEventRoot(event); 21 window_->MoveToEventRoot(event);
22 window_->Show(); 22 window_->Show();
23 window_->Activate(); 23 window_->Activate();
24 return kExistingWindowActivated; 24 return kExistingWindowActivated;
25 } 25 }
26 return kNoAction; 26 return kNoAction;
27 } 27 }
28 28
29 ui::SimpleMenuModel* TestShelfItemDelegate::CreateApplicationMenu( 29 ash::ShelfApplicationMenuItems TestShelfItemDelegate::GetAppMenuItems(
30 int event_flags) { 30 int event_flags) {
31 return nullptr; 31 return ash::ShelfApplicationMenuItems();
James Cook 2017/02/06 17:30:21 ditto?
msw 2017/02/07 09:12:01 ditto (removed ash:: specifier)
32 } 32 }
33 33
34 void TestShelfItemDelegate::Close() {} 34 void TestShelfItemDelegate::Close() {}
35 35
36 } // namespace test 36 } // namespace test
37 } // namespace ash 37 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698