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

Side by Side Diff: ash/wm/screen_pinning_controller_unittest.cc

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (Closed)
Patch Set: 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/wm/screen_pinning_controller.cc ('k') | ash/wm/session_state_animator.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/wm/screen_pinning_controller.h" 5 #include "ash/wm/screen_pinning_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/common/wm/window_state.h"
11 #include "ash/common/wm/wm_event.h"
12 #include "ash/common/wm_shell.h"
13 #include "ash/common/wm_window.h"
14 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
11 #include "ash/wm/window_state.h"
15 #include "ash/wm/window_util.h" 12 #include "ash/wm/window_util.h"
13 #include "ash/wm/wm_event.h"
14 #include "ash/wm_shell.h"
15 #include "ash/wm_window.h"
16 #include "base/stl_util.h" 16 #include "base/stl_util.h"
17 #include "ui/aura/window.h" 17 #include "ui/aura/window.h"
18 18
19 namespace ash { 19 namespace ash {
20 namespace { 20 namespace {
21 21
22 int FindIndex(const std::vector<aura::Window*>& windows, 22 int FindIndex(const std::vector<aura::Window*>& windows,
23 const aura::Window* target) { 23 const aura::Window* target) {
24 auto iter = std::find(windows.begin(), windows.end(), target); 24 auto iter = std::find(windows.begin(), windows.end(), target);
25 return iter != windows.end() ? iter - windows.begin() : -1; 25 return iter != windows.end() ? iter - windows.begin() : -1;
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 wm::PinWindow(w1, /* trusted */ true); 159 wm::PinWindow(w1, /* trusted */ true);
160 EXPECT_TRUE(WmShell::Get()->IsPinned()); 160 EXPECT_TRUE(WmShell::Get()->IsPinned());
161 161
162 WmShell::Get()->accelerator_controller()->PerformActionIfEnabled(UNPIN); 162 WmShell::Get()->accelerator_controller()->PerformActionIfEnabled(UNPIN);
163 // The UNPIN accelerator key is disabled for trusted pinned and the window 163 // The UNPIN accelerator key is disabled for trusted pinned and the window
164 // must be still pinned. 164 // must be still pinned.
165 EXPECT_TRUE(WmShell::Get()->IsPinned()); 165 EXPECT_TRUE(WmShell::Get()->IsPinned());
166 } 166 }
167 167
168 } // namespace ash 168 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/screen_pinning_controller.cc ('k') | ash/wm/session_state_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698