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

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

Issue 2907853002: [mus+ash] Removes WmWindow from ash/shelf and ash/shell (Closed)
Patch Set: [mus+ash] Removes WmWindow from ash/shelf and ash/shell (removed some more wm_window.h) Created 3 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_shell_delegate.h" 5 #include "ash/test/test_shell_delegate.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ash/gpu_support_stub.h" 9 #include "ash/gpu_support_stub.h"
10 #include "ash/palette_delegate.h" 10 #include "ash/palette_delegate.h"
(...skipping 21 matching lines...) Expand all
32 namespace test { 32 namespace test {
33 33
34 // A ShellObserver that sets the shelf alignment and auto hide behavior when the 34 // A ShellObserver that sets the shelf alignment and auto hide behavior when the
35 // shelf is created, to simulate ChromeLauncherController's behavior. 35 // shelf is created, to simulate ChromeLauncherController's behavior.
36 class ShelfInitializer : public ShellObserver { 36 class ShelfInitializer : public ShellObserver {
37 public: 37 public:
38 ShelfInitializer() { Shell::Get()->AddShellObserver(this); } 38 ShelfInitializer() { Shell::Get()->AddShellObserver(this); }
39 ~ShelfInitializer() override { Shell::Get()->RemoveShellObserver(this); } 39 ~ShelfInitializer() override { Shell::Get()->RemoveShellObserver(this); }
40 40
41 // ShellObserver: 41 // ShellObserver:
42 void OnShelfCreatedForRootWindow(WmWindow* root_window) override { 42 void OnShelfCreatedForRootWindow(aura::Window* root_window) override {
43 Shelf* shelf = root_window->GetRootWindowController()->GetShelf(); 43 Shelf* shelf = RootWindowController::ForWindow(root_window)->GetShelf();
44 // Do not override the custom initialization performed by some unit tests. 44 // Do not override the custom initialization performed by some unit tests.
45 if (shelf->alignment() == SHELF_ALIGNMENT_BOTTOM_LOCKED && 45 if (shelf->alignment() == SHELF_ALIGNMENT_BOTTOM_LOCKED &&
46 shelf->auto_hide_behavior() == SHELF_AUTO_HIDE_ALWAYS_HIDDEN) { 46 shelf->auto_hide_behavior() == SHELF_AUTO_HIDE_ALWAYS_HIDDEN) {
47 shelf->SetAlignment(SHELF_ALIGNMENT_BOTTOM); 47 shelf->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
48 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); 48 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
49 shelf->UpdateVisibilityState(); 49 shelf->UpdateVisibilityState();
50 } 50 }
51 } 51 }
52 52
53 private: 53 private:
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 void TestShellDelegate::SetTouchscreenEnabledInPrefs(bool enabled, 160 void TestShellDelegate::SetTouchscreenEnabledInPrefs(bool enabled,
161 bool use_local_state) { 161 bool use_local_state) {
162 if (use_local_state) 162 if (use_local_state)
163 touchscreen_enabled_in_local_pref_ = enabled; 163 touchscreen_enabled_in_local_pref_ = enabled;
164 } 164 }
165 165
166 void TestShellDelegate::UpdateTouchscreenStatusFromPrefs() {} 166 void TestShellDelegate::UpdateTouchscreenStatusFromPrefs() {}
167 167
168 } // namespace test 168 } // namespace test
169 } // namespace ash 169 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/web_notification/ash_popup_alignment_delegate.cc ('k') | ash/wm/always_on_top_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698