blob: c43f9cca864cb12de4465338fd1010a595ffda5b [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// 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
5#ifndef ASH_WM_WORKSPACE_CONTROLLER_H_
6#define ASH_WM_WORKSPACE_CONTROLLER_H_
7
8#include "ash/ash_export.h"
9#include "ash/wm/workspace/workspace_types.h"
10#include "base/basictypes.h"
11#include "base/memory/scoped_ptr.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000012
13namespace aura {
14class Window;
15}
16
17namespace ash {
Torne (Richard Coles)58218062012-11-14 11:43:16 +000018class ShelfLayoutManager;
19class WorkspaceControllerTestHelper;
20class WorkspaceEventHandler;
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +010021class WorkspaceLayoutManager;
Torne (Richard Coles)a1401312014-03-18 10:20:56 +000022class WorkspaceLayoutManagerDelegate;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000023
24// WorkspaceController acts as a central place that ties together all the
25// various workspace pieces.
Torne (Richard Coles)a36e5922013-08-05 13:57:33 +010026class ASH_EXPORT WorkspaceController {
Torne (Richard Coles)58218062012-11-14 11:43:16 +000027 public:
28 explicit WorkspaceController(aura::Window* viewport);
29 virtual ~WorkspaceController();
30
31 // Returns the current window state.
32 WorkspaceWindowState GetWindowState() const;
33
34 void SetShelf(ShelfLayoutManager* shelf);
35
Torne (Richard Coles)58218062012-11-14 11:43:16 +000036 // Starts the animation that occurs on first login.
37 void DoInitialAnimation();
38
Torne (Richard Coles)a1401312014-03-18 10:20:56 +000039 // Add a delegate which adds a backdrop behind the top window of the default
40 // workspace.
41 void SetMaximizeBackdropDelegate(
42 scoped_ptr<WorkspaceLayoutManagerDelegate> delegate);
43
Torne (Richard Coles)46d4c2b2014-06-09 12:00:27 +010044 WorkspaceLayoutManager* layout_manager() { return layout_manager_; }
45
Torne (Richard Coles)58218062012-11-14 11:43:16 +000046 private:
47 friend class WorkspaceControllerTestHelper;
48
49 aura::Window* viewport_;
50
Ben Murdochc5cede92014-04-10 11:22:14 +010051 ShelfLayoutManager* shelf_;
52 scoped_ptr<WorkspaceEventHandler> event_handler_;
53 WorkspaceLayoutManager* layout_manager_;
Torne (Richard Coles)58218062012-11-14 11:43:16 +000054
55 DISALLOW_COPY_AND_ASSIGN(WorkspaceController);
56};
57
Torne (Richard Coles)58218062012-11-14 11:43:16 +000058} // namespace ash
59
60#endif // ASH_WM_WORKSPACE_CONTROLLER_H_