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

Side by Side Diff: ash/mus/shell_delegate_mus.cc

Issue 2688353005: Fix shelf alignment and auto-hide initialization. (Closed)
Patch Set: Fix mash_unittests by installing a TestShellDelegate. 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 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/mus/shell_delegate_mus.h" 5 #include "ash/mus/shell_delegate_mus.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/gpu_support_stub.h" 9 #include "ash/common/gpu_support_stub.h"
10 #include "ash/common/palette_delegate.h" 10 #include "ash/common/palette_delegate.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 bool screen_locked_; 77 bool screen_locked_;
78 78
79 // A pseudo user info. 79 // A pseudo user info.
80 std::unique_ptr<user_manager::UserInfo> user_info_; 80 std::unique_ptr<user_manager::UserInfo> user_info_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateStub); 82 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateStub);
83 }; 83 };
84 84
85 } // namespace 85 } // namespace
86 86
87 ShellDelegateMus::ShellDelegateMus( 87 ShellDelegateMus::ShellDelegateMus(service_manager::Connector* connector)
88 service_manager::Connector* connector, 88 : connector_(connector) {}
89 std::unique_ptr<SystemTrayDelegate> system_tray_delegate_for_test)
90 : connector_(connector),
91 system_tray_delegate_for_test_(std::move(system_tray_delegate_for_test)) {
92 }
93 89
94 ShellDelegateMus::~ShellDelegateMus() {} 90 ShellDelegateMus::~ShellDelegateMus() {}
95 91
96 service_manager::Connector* ShellDelegateMus::GetShellConnector() const { 92 service_manager::Connector* ShellDelegateMus::GetShellConnector() const {
97 return connector_; 93 return connector_;
98 } 94 }
99 95
100 bool ShellDelegateMus::IsIncognitoAllowed() const { 96 bool ShellDelegateMus::IsIncognitoAllowed() const {
101 NOTIMPLEMENTED(); 97 NOTIMPLEMENTED();
102 return false; 98 return false;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 137
142 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) { 138 void ShellDelegateMus::OpenUrlFromArc(const GURL& url) {
143 NOTIMPLEMENTED(); 139 NOTIMPLEMENTED();
144 } 140 }
145 141
146 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) { 142 ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) {
147 return new ShelfDelegateMus(); 143 return new ShelfDelegateMus();
148 } 144 }
149 145
150 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() { 146 SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() {
151 if (system_tray_delegate_for_test_)
152 return system_tray_delegate_for_test_.release();
153 return new SystemTrayDelegateMus(); 147 return new SystemTrayDelegateMus();
154 } 148 }
155 149
156 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() { 150 std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() {
157 return base::MakeUnique<WallpaperDelegateMus>(); 151 return base::MakeUnique<WallpaperDelegateMus>();
158 } 152 }
159 153
160 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() { 154 SessionStateDelegate* ShellDelegateMus::CreateSessionStateDelegate() {
161 // TODO: http://crbug.com/647416. 155 // TODO: http://crbug.com/647416.
162 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation"; 156 NOTIMPLEMENTED() << " Using a stub SessionStateDeleagte implementation";
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 void ShellDelegateMus::SetTouchscreenEnabledInPrefs(bool enabled, 196 void ShellDelegateMus::SetTouchscreenEnabledInPrefs(bool enabled,
203 bool use_local_state) { 197 bool use_local_state) {
204 NOTIMPLEMENTED(); 198 NOTIMPLEMENTED();
205 } 199 }
206 200
207 void ShellDelegateMus::UpdateTouchscreenStatusFromPrefs() { 201 void ShellDelegateMus::UpdateTouchscreenStatusFromPrefs() {
208 NOTIMPLEMENTED(); 202 NOTIMPLEMENTED();
209 } 203 }
210 204
211 } // namespace ash 205 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698