[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | f7eb89c | 2011-12-13 09:48:54 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
James Cook | 346c8c6 | 2017-07-18 19:38:37 | [diff] [blame] | 5 | #include "ash/test_shell_delegate.h" |
[email protected] | f7eb89c | 2011-12-13 09:48:54 | [diff] [blame] | 6 | |
Qiang Xu | 89af823e | 2017-12-05 04:04:47 | [diff] [blame] | 7 | #include "ash/accessibility/default_accessibility_delegate.h" |
James Cook | b0bf8e8 | 2017-04-09 17:01:44 | [diff] [blame] | 8 | #include "ash/system/tray/system_tray_notifier.h" |
James Cook | 5e9d340 | 2017-11-01 00:20:12 | [diff] [blame] | 9 | #include "ash/test_screenshot_delegate.h" |
[email protected] | fcb123d | 2013-04-17 15:58:49 | [diff] [blame] | 10 | #include "base/logging.h" |
afakhry | cd2bb98d | 2015-09-09 09:03:42 | [diff] [blame] | 11 | #include "ui/gfx/image/image.h" |
[email protected] | 40c4cbb | 2012-01-10 23:26:07 | [diff] [blame] | 12 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 13 | namespace ash { |
[email protected] | f7eb89c | 2011-12-13 09:48:54 | [diff] [blame] | 14 | |
warx | 67a6d3f | 2017-05-31 21:00:21 | [diff] [blame] | 15 | TestShellDelegate::TestShellDelegate() = default; |
[email protected] | f7eb89c | 2011-12-13 09:48:54 | [diff] [blame] | 16 | |
warx | 67a6d3f | 2017-05-31 21:00:21 | [diff] [blame] | 17 | TestShellDelegate::~TestShellDelegate() = default; |
[email protected] | f7eb89c | 2011-12-13 09:48:54 | [diff] [blame] | 18 | |
Andrew Xu | 048f24b | 2019-01-16 21:21:23 | [diff] [blame] | 19 | bool TestShellDelegate::CanShowWindowForUser(const aura::Window* window) const { |
ben | 894584d | 2015-09-30 23:56:53 | [diff] [blame] | 20 | return true; |
21 | } | ||||
22 | |||||
James Cook | 5e9d340 | 2017-11-01 00:20:12 | [diff] [blame] | 23 | std::unique_ptr<ScreenshotDelegate> |
24 | TestShellDelegate::CreateScreenshotDelegate() { | ||||
25 | return std::make_unique<TestScreenshotDelegate>(); | ||||
26 | } | ||||
27 | |||||
[email protected] | f3ab6eff5 | 2013-10-24 03:29:38 | [diff] [blame] | 28 | AccessibilityDelegate* TestShellDelegate::CreateAccessibilityDelegate() { |
Qiang Xu | 89af823e | 2017-12-05 04:04:47 | [diff] [blame] | 29 | return new DefaultAccessibilityDelegate; |
[email protected] | f3ab6eff5 | 2013-10-24 03:29:38 | [diff] [blame] | 30 | } |
31 | |||||
minch | 64f3b43b | 2019-10-21 21:59:26 | [diff] [blame] | 32 | bool TestShellDelegate::CanGoBack(gfx::NativeWindow window) const { |
minch | 4553eb0 | 2019-11-20 23:25:47 | [diff] [blame] | 33 | return can_go_back_; |
34 | } | ||||
35 | |||||
Ken Rockot | 3f90e70e0 | 2019-12-04 23:27:23 | [diff] [blame^] | 36 | void TestShellDelegate::BindNavigableContentsFactory( |
37 | mojo::PendingReceiver<content::mojom::NavigableContentsFactory> receiver) {} | ||||
38 | |||||
minch | 4553eb0 | 2019-11-20 23:25:47 | [diff] [blame] | 39 | void TestShellDelegate::SetCanGoBack(bool can_go_back) { |
40 | can_go_back_ = can_go_back; | ||||
minch | 64f3b43b | 2019-10-21 21:59:26 | [diff] [blame] | 41 | } |
42 | |||||
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 43 | } // namespace ash |