blob: 5f831c18db48ce5ff595749fc3259b4c2b4237fe [file] [log] [blame]
jamescook33375732016-07-14 22:09:281// Copyright 2016 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "ash/mus/shell_delegate_mus.h"
6
7#include <utility>
8
James Cookb0bf8e82017-04-09 17:01:449#include "ash/gpu_support_stub.h"
jamescook428f986f2016-07-15 19:13:2510#include "ash/mus/accessibility_delegate_mus.h"
msw7d03b2062016-09-10 00:13:2111#include "ash/mus/wallpaper_delegate_mus.h"
James Cookb0bf8e82017-04-09 17:01:4412#include "ash/palette_delegate.h"
jamescook33375732016-07-14 22:09:2813#include "base/memory/ptr_util.h"
14#include "base/strings/string16.h"
mswccb5d692016-08-17 20:37:4815#include "base/strings/string_util.h"
jamescook33375732016-07-14 22:09:2816#include "components/user_manager/user_info_impl.h"
jamescook33375732016-07-14 22:09:2817#include "ui/gfx/image/image.h"
yhanada8909a542017-07-11 10:06:1918#include "ui/keyboard/keyboard_ui.h"
Scott Violet17a61722017-06-19 17:54:3119#include "services/ui/public/cpp/input_devices/input_device_controller_client.h"
Scott Violet17a61722017-06-19 17:54:3120
jamescook33375732016-07-14 22:09:2821namespace ash {
jamescook33375732016-07-14 22:09:2822
msw0bc6a072017-02-14 16:33:3823ShellDelegateMus::ShellDelegateMus(service_manager::Connector* connector)
24 : connector_(connector) {}
jamescook33375732016-07-14 22:09:2825
26ShellDelegateMus::~ShellDelegateMus() {}
27
rockot400ea35b2016-10-15 19:15:3228service_manager::Connector* ShellDelegateMus::GetShellConnector() const {
jamescook2a6b8692016-10-04 02:41:2929 return connector_;
30}
31
jamescook33375732016-07-14 22:09:2832bool ShellDelegateMus::IsIncognitoAllowed() const {
33 NOTIMPLEMENTED();
34 return false;
35}
36
37bool ShellDelegateMus::IsMultiProfilesEnabled() const {
38 NOTIMPLEMENTED();
James Cooka1c01282017-07-10 19:01:5339 return true; // For manual testing of multi-profile under mash.
jamescook33375732016-07-14 22:09:2840}
41
42bool ShellDelegateMus::IsRunningInForcedAppMode() const {
43 NOTIMPLEMENTED();
44 return false;
45}
46
varkhad43f55242017-05-26 20:55:5847bool ShellDelegateMus::CanShowWindowForUser(aura::Window* window) const {
jamescook33375732016-07-14 22:09:2848 NOTIMPLEMENTED();
49 return true;
50}
51
52bool ShellDelegateMus::IsForceMaximizeOnFirstRun() const {
53 NOTIMPLEMENTED();
54 return false;
55}
56
57void ShellDelegateMus::PreInit() {
58 NOTIMPLEMENTED();
59}
60
61void ShellDelegateMus::PreShutdown() {
62 NOTIMPLEMENTED();
63}
64
65void ShellDelegateMus::Exit() {
66 NOTIMPLEMENTED();
67}
68
yhanada8909a542017-07-11 10:06:1969std::unique_ptr<keyboard::KeyboardUI> ShellDelegateMus::CreateKeyboardUI() {
jamescook33375732016-07-14 22:09:2870 NOTIMPLEMENTED();
71 return nullptr;
72}
73
kenobib7af62b2016-07-29 21:40:1674void ShellDelegateMus::OpenUrlFromArc(const GURL& url) {
jamescook33375732016-07-14 22:09:2875 NOTIMPLEMENTED();
76}
77
msw5138f3d2017-04-20 00:22:0778void ShellDelegateMus::ShelfInit() {
79 NOTIMPLEMENTED();
80}
81
82void ShellDelegateMus::ShelfShutdown() {
83 NOTIMPLEMENTED();
jamescook33375732016-07-14 22:09:2884}
85
James Cook8d5b29f2017-08-16 21:19:0686NetworkingConfigDelegate* ShellDelegateMus::GetNetworkingConfigDelegate() {
87 // TODO(mash): Provide a real implementation, perhaps by folding its behavior
88 // into an ash-side network information cache. http://crbug.com/651157
89 NOTIMPLEMENTED();
90 return nullptr;
jamescook33375732016-07-14 22:09:2891}
92
msw0e91d932016-08-25 22:34:0993std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() {
mswc691bf12016-10-19 17:05:3994 return base::MakeUnique<WallpaperDelegateMus>();
jamescook33375732016-07-14 22:09:2895}
96
jamescook33375732016-07-14 22:09:2897AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() {
jamescook428f986f2016-07-15 19:13:2598 return new AccessibilityDelegateMus(connector_);
jamescook33375732016-07-14 22:09:2899}
100
jdufault0f4fa6e2016-08-05 19:13:59101std::unique_ptr<PaletteDelegate> ShellDelegateMus::CreatePaletteDelegate() {
sky1eb7caa2016-09-16 00:02:46102 // TODO: http://crbug.com/647417.
jdufault0f4fa6e2016-08-05 19:13:59103 NOTIMPLEMENTED();
104 return nullptr;
105}
106
jamescook33375732016-07-14 22:09:28107GPUSupport* ShellDelegateMus::CreateGPUSupport() {
sky1eb7caa2016-09-16 00:02:46108 // TODO: http://crbug.com/647421.
jamescook33375732016-07-14 22:09:28109 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation";
110 return new GPUSupportStub();
111}
112
113base::string16 ShellDelegateMus::GetProductName() const {
114 NOTIMPLEMENTED();
115 return base::string16();
116}
117
118gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const {
119 NOTIMPLEMENTED();
120 return gfx::Image();
121}
122
Qiang Xu50c6f8c2017-08-31 20:55:24123bool ShellDelegateMus::GetTouchscreenEnabled(
124 TouchscreenEnabledSource source) const {
warx4c8baedb2016-12-03 22:38:50125 NOTIMPLEMENTED();
126 return true;
127}
128
Qiang Xu50c6f8c2017-08-31 20:55:24129void ShellDelegateMus::SetTouchscreenEnabled(bool enabled,
130 TouchscreenEnabledSource source) {
warx4c8baedb2016-12-03 22:38:50131 NOTIMPLEMENTED();
132}
133
Scott Violet17a61722017-06-19 17:54:31134ui::InputDeviceControllerClient*
135ShellDelegateMus::GetInputDeviceControllerClient() {
136 if (!connector_)
137 return nullptr; // Happens in tests.
138
139 if (!input_device_controller_client_) {
140 input_device_controller_client_ =
141 base::MakeUnique<ui::InputDeviceControllerClient>(connector_);
142 }
143 return input_device_controller_client_.get();
144}
Scott Violet17a61722017-06-19 17:54:31145
jamescook33375732016-07-14 22:09:28146} // namespace ash