blob: 83e731e2c010411889f5c72f0df5c2c8581b0e27 [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
Mitsuru Oshima04b54d02017-10-09 14:22:457#include <memory>
jamescook33375732016-07-14 22:09:288#include <utility>
9
James Cook37b7d102017-10-06 04:35:1910#include "ash/accessibility/default_accessibility_delegate.h"
James Cookb0bf8e82017-04-09 17:01:4411#include "ash/gpu_support_stub.h"
msw7d03b2062016-09-10 00:13:2112#include "ash/mus/wallpaper_delegate_mus.h"
James Cookb0bf8e82017-04-09 17:01:4413#include "ash/palette_delegate.h"
jamescook33375732016-07-14 22:09:2814#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"
James Cook5fbdccb2017-09-01 21:17:5517#include "services/ui/public/cpp/input_devices/input_device_controller_client.h"
jamescook33375732016-07-14 22:09:2818#include "ui/gfx/image/image.h"
yhanada8909a542017-07-11 10:06:1919#include "ui/keyboard/keyboard_ui.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::IsRunningInForcedAppMode() const {
33 NOTIMPLEMENTED();
34 return false;
35}
36
varkhad43f55242017-05-26 20:55:5837bool ShellDelegateMus::CanShowWindowForUser(aura::Window* window) const {
jamescook33375732016-07-14 22:09:2838 NOTIMPLEMENTED();
39 return true;
40}
41
42bool ShellDelegateMus::IsForceMaximizeOnFirstRun() const {
43 NOTIMPLEMENTED();
44 return false;
45}
46
47void ShellDelegateMus::PreInit() {
48 NOTIMPLEMENTED();
49}
50
51void ShellDelegateMus::PreShutdown() {
52 NOTIMPLEMENTED();
53}
54
yhanada8909a542017-07-11 10:06:1955std::unique_ptr<keyboard::KeyboardUI> ShellDelegateMus::CreateKeyboardUI() {
jamescook33375732016-07-14 22:09:2856 NOTIMPLEMENTED();
57 return nullptr;
58}
59
kenobib7af62b2016-07-29 21:40:1660void ShellDelegateMus::OpenUrlFromArc(const GURL& url) {
jamescook33375732016-07-14 22:09:2861 NOTIMPLEMENTED();
62}
63
James Cook8d5b29f2017-08-16 21:19:0664NetworkingConfigDelegate* ShellDelegateMus::GetNetworkingConfigDelegate() {
65 // TODO(mash): Provide a real implementation, perhaps by folding its behavior
66 // into an ash-side network information cache. http://crbug.com/651157
67 NOTIMPLEMENTED();
68 return nullptr;
jamescook33375732016-07-14 22:09:2869}
70
msw0e91d932016-08-25 22:34:0971std::unique_ptr<WallpaperDelegate> ShellDelegateMus::CreateWallpaperDelegate() {
Mitsuru Oshima04b54d02017-10-09 14:22:4572 return std::make_unique<WallpaperDelegateMus>();
jamescook33375732016-07-14 22:09:2873}
74
jamescook33375732016-07-14 22:09:2875AccessibilityDelegate* ShellDelegateMus::CreateAccessibilityDelegate() {
James Cook5fbdccb2017-09-01 21:17:5576 return new DefaultAccessibilityDelegate;
jamescook33375732016-07-14 22:09:2877}
78
jdufault0f4fa6e2016-08-05 19:13:5979std::unique_ptr<PaletteDelegate> ShellDelegateMus::CreatePaletteDelegate() {
sky1eb7caa2016-09-16 00:02:4680 // TODO: http://crbug.com/647417.
jdufault0f4fa6e2016-08-05 19:13:5981 NOTIMPLEMENTED();
82 return nullptr;
83}
84
jamescook33375732016-07-14 22:09:2885GPUSupport* ShellDelegateMus::CreateGPUSupport() {
sky1eb7caa2016-09-16 00:02:4686 // TODO: http://crbug.com/647421.
jamescook33375732016-07-14 22:09:2887 NOTIMPLEMENTED() << " Using a stub GPUSupport implementation";
88 return new GPUSupportStub();
89}
90
91base::string16 ShellDelegateMus::GetProductName() const {
92 NOTIMPLEMENTED();
93 return base::string16();
94}
95
96gfx::Image ShellDelegateMus::GetDeprecatedAcceleratorImage() const {
97 NOTIMPLEMENTED();
98 return gfx::Image();
99}
100
Scott Violet17a61722017-06-19 17:54:31101ui::InputDeviceControllerClient*
102ShellDelegateMus::GetInputDeviceControllerClient() {
103 if (!connector_)
104 return nullptr; // Happens in tests.
105
106 if (!input_device_controller_client_) {
107 input_device_controller_client_ =
Mitsuru Oshima04b54d02017-10-09 14:22:45108 std::make_unique<ui::InputDeviceControllerClient>(connector_);
Scott Violet17a61722017-06-19 17:54:31109 }
110 return input_device_controller_client_.get();
111}
Scott Violet17a61722017-06-19 17:54:31112
jamescook33375732016-07-14 22:09:28113} // namespace ash