blob: 59f68bdd1b1292127cac50d3949db15dfb5b69ba (
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
|
// 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/shell/shell_delegate_impl.h"
#include "ash/shell/example_factory.h"
#include "ash/shell/launcher_delegate_impl.h"
#include "ash/shell/toplevel_window.h"
#include "ash/shell_window_ids.h"
#include "ash/wm/partial_screenshot_view.h"
#include "base/message_loop.h"
#include "ui/aura/window.h"
namespace ash {
namespace shell {
ShellDelegateImpl::ShellDelegateImpl()
: watcher_(NULL),
launcher_delegate_(NULL),
locked_(false) {
}
ShellDelegateImpl::~ShellDelegateImpl() {
}
void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) {
watcher_ = watcher;
if (launcher_delegate_)
launcher_delegate_->set_watcher(watcher);
}
bool ShellDelegateImpl::IsUserLoggedIn() {
return true;
}
void ShellDelegateImpl::LockScreen() {
ash::shell::CreateLockScreen();
locked_ = true;
ash::Shell::GetInstance()->UpdateShelfVisibility();
}
void ShellDelegateImpl::UnlockScreen() {
locked_ = false;
ash::Shell::GetInstance()->UpdateShelfVisibility();
}
bool ShellDelegateImpl::IsScreenLocked() const {
return locked_;
}
void ShellDelegateImpl::Shutdown() {
}
void ShellDelegateImpl::Exit() {
MessageLoopForUI::current()->Quit();
}
void ShellDelegateImpl::NewTab() {
}
void ShellDelegateImpl::NewWindow(bool incognito) {
ash::shell::ToplevelWindow::CreateParams create_params;
create_params.can_resize = true;
create_params.can_maximize = true;
ash::shell::ToplevelWindow::CreateToplevelWindow(create_params);
}
void ShellDelegateImpl::OpenFileManager() {
}
void ShellDelegateImpl::OpenCrosh() {
}
void ShellDelegateImpl::OpenMobileSetup(const std::string& service_path) {
}
void ShellDelegateImpl::RestoreTab() {
}
void ShellDelegateImpl::ShowKeyboardOverlay() {
}
void ShellDelegateImpl::ShowTaskManager() {
}
content::BrowserContext* ShellDelegateImpl::GetCurrentBrowserContext() {
return Shell::GetInstance()->browser_context();
}
void ShellDelegateImpl::ToggleSpokenFeedback() {
}
app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() {
return ash::shell::CreateAppListViewDelegate();
}
void ShellDelegateImpl::StartPartialScreenshot(
ash::ScreenshotDelegate* screenshot_delegate) {
ash::PartialScreenshotView::StartPartialScreenshot(screenshot_delegate);
}
ash::LauncherDelegate* ShellDelegateImpl::CreateLauncherDelegate(
ash::LauncherModel* model) {
launcher_delegate_ = new LauncherDelegateImpl(watcher_);
return launcher_delegate_;
}
ash::SystemTrayDelegate* ShellDelegateImpl::CreateSystemTrayDelegate(
ash::SystemTray* tray) {
return NULL;
}
ash::UserWallpaperDelegate* ShellDelegateImpl::CreateUserWallpaperDelegate() {
return NULL;
}
aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() {
return NULL;
}
} // namespace shell
} // namespace ash
|