blob: 14fde65aaa4887f332b567a4bbdc3f9439f39c34 [file] [log] [blame]
[email protected]40c4cbb2012-01-10 23:26:071// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]f7eb89c2011-12-13 09:48:542// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
James Cook346c8c62017-07-18 19:38:375#include "ash/test_shell_delegate.h"
[email protected]f7eb89c2011-12-13 09:48:546
Qiang Xu89af823e2017-12-05 04:04:477#include "ash/accessibility/default_accessibility_delegate.h"
James Cookb0bf8e82017-04-09 17:01:448#include "ash/system/tray/system_tray_notifier.h"
James Cook5e9d3402017-11-01 00:20:129#include "ash/test_screenshot_delegate.h"
Xiaoqian Daic9f06c792020-02-19 20:52:3510#include "ash/wm/gestures/back_gesture/test_back_gesture_contextual_nudge_delegate.h"
[email protected]fcb123d2013-04-17 15:58:4911#include "base/logging.h"
afakhrycd2bb98d2015-09-09 09:03:4212#include "ui/gfx/image/image.h"
[email protected]40c4cbb2012-01-10 23:26:0713
[email protected]55f593352011-12-24 05:42:4614namespace ash {
[email protected]f7eb89c2011-12-13 09:48:5415
warx67a6d3f2017-05-31 21:00:2116TestShellDelegate::TestShellDelegate() = default;
[email protected]f7eb89c2011-12-13 09:48:5417
warx67a6d3f2017-05-31 21:00:2118TestShellDelegate::~TestShellDelegate() = default;
[email protected]f7eb89c2011-12-13 09:48:5419
Andrew Xu048f24b2019-01-16 21:21:2320bool TestShellDelegate::CanShowWindowForUser(const aura::Window* window) const {
ben894584d2015-09-30 23:56:5321 return true;
22}
23
James Cook5e9d3402017-11-01 00:20:1224std::unique_ptr<ScreenshotDelegate>
25TestShellDelegate::CreateScreenshotDelegate() {
26 return std::make_unique<TestScreenshotDelegate>();
27}
28
[email protected]f3ab6eff52013-10-24 03:29:3829AccessibilityDelegate* TestShellDelegate::CreateAccessibilityDelegate() {
Qiang Xu89af823e2017-12-05 04:04:4730 return new DefaultAccessibilityDelegate;
[email protected]f3ab6eff52013-10-24 03:29:3831}
32
Xiaoqian Daic9f06c792020-02-19 20:52:3533std::unique_ptr<BackGestureContextualNudgeDelegate>
34TestShellDelegate::CreateBackGestureContextualNudgeDelegate(
35 BackGestureContextualNudgeController* controller) {
36 return std::make_unique<TestBackGestureContextualNudgeDelegate>(controller);
37}
38
minch64f3b43b2019-10-21 21:59:2639bool TestShellDelegate::CanGoBack(gfx::NativeWindow window) const {
minch4553eb02019-11-20 23:25:4740 return can_go_back_;
41}
42
Ken Rockot3f90e70e02019-12-04 23:27:2343void TestShellDelegate::BindNavigableContentsFactory(
44 mojo::PendingReceiver<content::mojom::NavigableContentsFactory> receiver) {}
45
Ken Rockot6b5017e2019-12-05 20:39:4146void TestShellDelegate::BindMultiDeviceSetup(
47 mojo::PendingReceiver<chromeos::multidevice_setup::mojom::MultiDeviceSetup>
48 receiver) {
49 if (multidevice_setup_binder_)
50 multidevice_setup_binder_.Run(std::move(receiver));
51}
52
minch4553eb02019-11-20 23:25:4753void TestShellDelegate::SetCanGoBack(bool can_go_back) {
54 can_go_back_ = can_go_back;
minch64f3b43b2019-10-21 21:59:2655}
56
[email protected]55f593352011-12-24 05:42:4657} // namespace ash