blob: b8d118b1be6df035c468bb462d079a2fbe763feb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/test/test_shell_delegate.h"
#include <algorithm>
#include "ash/caps_lock_delegate_stub.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/test/test_launcher_delegate.h"
#include "ash/wm/window_util.h"
#include "content/public/test/test_browser_context.h"
#include "ui/aura/window.h"
namespace ash {
namespace test {
TestShellDelegate::TestShellDelegate()
: locked_(false),
spoken_feedback_enabled_(false) {
}
TestShellDelegate::~TestShellDelegate() {
}
bool TestShellDelegate::IsUserLoggedIn() {
return true;
}
bool TestShellDelegate::IsSessionStarted() {
return true;
}
bool TestShellDelegate::IsFirstRunAfterBoot() {
return false;
}
void TestShellDelegate::LockScreen() {
locked_ = true;
}
void TestShellDelegate::UnlockScreen() {
locked_ = false;
}
bool TestShellDelegate::IsScreenLocked() const {
return locked_;
}
void TestShellDelegate::Shutdown() {
}
void TestShellDelegate::Exit() {
}
void TestShellDelegate::NewTab() {
}
void TestShellDelegate::NewWindow(bool incognito) {
}
void TestShellDelegate::ToggleMaximized() {
aura::Window* window = ash::wm::GetActiveWindow();
if (window)
ash::wm::ToggleMaximizedWindow(window);
}
void TestShellDelegate::OpenFileManager(bool as_dialog) {
}
void TestShellDelegate::OpenCrosh() {
}
void TestShellDelegate::OpenMobileSetup(const std::string& service_path) {
}
void TestShellDelegate::RestoreTab() {
}
bool TestShellDelegate::RotatePaneFocus(Shell::Direction direction) {
return true;
}
void TestShellDelegate::ShowKeyboardOverlay() {
}
void TestShellDelegate::ShowTaskManager() {
}
content::BrowserContext* TestShellDelegate::GetCurrentBrowserContext() {
current_browser_context_.reset(new content::TestBrowserContext());
return current_browser_context_.get();
}
void TestShellDelegate::ToggleSpokenFeedback() {
spoken_feedback_enabled_ = !spoken_feedback_enabled_;
}
bool TestShellDelegate::IsSpokenFeedbackEnabled() const {
return spoken_feedback_enabled_;
}
app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() {
return NULL;
}
LauncherDelegate* TestShellDelegate::CreateLauncherDelegate(
ash::LauncherModel* model) {
return new TestLauncherDelegate(model);
}
SystemTrayDelegate* TestShellDelegate::CreateSystemTrayDelegate(
SystemTray* tray) {
return NULL;
}
UserWallpaperDelegate* TestShellDelegate::CreateUserWallpaperDelegate() {
return NULL;
}
CapsLockDelegate* TestShellDelegate::CreateCapsLockDelegate() {
return new CapsLockDelegateStub;
}
aura::client::UserActionClient* TestShellDelegate::CreateUserActionClient() {
return NULL;
}
void TestShellDelegate::OpenFeedbackPage() {
}
void TestShellDelegate::RecordUserMetricsAction(UserMetricsAction action) {
}
void TestShellDelegate::HandleMediaNextTrack() {
}
void TestShellDelegate::HandleMediaPlayPause() {
}
void TestShellDelegate::HandleMediaPrevTrack() {
}
string16 TestShellDelegate::GetTimeRemainingString(base::TimeDelta delta) {
return string16();
}
void TestShellDelegate::SaveScreenMagnifierScale(double scale) {
}
double TestShellDelegate::GetSavedScreenMagnifierScale() {
return std::numeric_limits<double>::min();
}
} // namespace test
} // namespace ash
|