blob: 8d77a0b27ccdcfb68cd678edf41424ad76945fb0 [file] [log] [blame]
[email protected]0c68e892012-12-08 16:54:531// Copyright (c) 2012 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
James Cook346c8c62017-07-18 19:38:375#include "ash/shell_test_api.h"
sky5ad143a2017-03-22 04:31:236
xiyuan317fdbe2017-05-31 15:02:027#include <utility>
8
James Cookb0bf8e82017-04-09 17:01:449#include "ash/palette_delegate.h"
[email protected]0c68e892012-12-08 16:54:5310#include "ash/root_window_controller.h"
11#include "ash/shell.h"
James Cookbbe5cb12017-08-08 18:32:2112#include "components/prefs/testing_pref_service.h"
[email protected]0c68e892012-12-08 16:54:5313
14namespace ash {
[email protected]0c68e892012-12-08 16:54:5315
skycb4be5b2017-04-06 17:52:4516ShellTestApi::ShellTestApi() : ShellTestApi(Shell::Get()) {}
sky07a24d42017-03-09 23:57:3017
[email protected]0c68e892012-12-08 16:54:5318ShellTestApi::ShellTestApi(Shell* shell) : shell_(shell) {}
19
[email protected]093b8d642014-04-03 20:59:2820SystemGestureEventFilter* ShellTestApi::system_gesture_event_filter() {
[email protected]0c68e892012-12-08 16:54:5321 return shell_->system_gesture_filter_.get();
22}
23
[email protected]093b8d642014-04-03 20:59:2824WorkspaceController* ShellTestApi::workspace_controller() {
[email protected]0c68e892012-12-08 16:54:5325 return shell_->GetPrimaryRootWindowController()->workspace_controller();
26}
27
[email protected]093b8d642014-04-03 20:59:2828ScreenPositionController* ShellTestApi::screen_position_controller() {
[email protected]0c68e892012-12-08 16:54:5329 return shell_->screen_position_controller_.get();
30}
31
erg36cfb952017-06-21 19:41:4532NativeCursorManagerAsh* ShellTestApi::native_cursor_manager_ash() {
[email protected]c0ff0342013-02-27 00:41:2933 return shell_->native_cursor_manager_;
34}
35
[email protected]093b8d642014-04-03 20:59:2836DragDropController* ShellTestApi::drag_drop_controller() {
[email protected]c086bab2013-06-06 21:46:4437 return shell_->drag_drop_controller_.get();
38}
39
sky07a24d42017-03-09 23:57:3040void ShellTestApi::SetPaletteDelegate(
41 std::unique_ptr<PaletteDelegate> palette_delegate) {
42 shell_->palette_delegate_ = std::move(palette_delegate);
43}
44
James Cookbbe5cb12017-08-08 18:32:2145void ShellTestApi::OnLocalStatePrefServiceInitialized(
46 std::unique_ptr<PrefService> pref_service) {
47 shell_->OnLocalStatePrefServiceInitialized(std::move(pref_service));
48}
49
[email protected]0c68e892012-12-08 16:54:5350} // namespace ash