blob: 612ebb298b7ff5940c3ffd220220c2a43c60e019 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_LAUNCHER_LAUNCHER_H_
#define ASH_LAUNCHER_LAUNCHER_H_
#pragma once
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "ash/ash_export.h"
namespace aura {
class Window;
}
namespace views {
class Widget;
}
namespace ash {
class LauncherModel;
class ASH_EXPORT Launcher {
public:
explicit Launcher(aura::Window* window_container);
~Launcher();
// Sets the width of the status area.
void SetStatusWidth(int width);
int GetStatusWidth();
LauncherModel* model() { return model_.get(); }
views::Widget* widget() { return widget_.get(); }
aura::Window* window_container() { return window_container_; }
private:
class DelegateView;
// If necessary asks the delegate if an entry should be created in the
// launcher for |window|. This only asks the delegate once for a window.
void MaybeAdd(aura::Window* window);
scoped_ptr<LauncherModel> model_;
// Widget hosting the view. May be hidden if we're not using a launcher,
// e.g. Aura compact window mode.
scoped_ptr<views::Widget> widget_;
aura::Window* window_container_;
// Contents view of the widget. Houses the LauncherView.
DelegateView* delegate_view_;
DISALLOW_COPY_AND_ASSIGN(Launcher);
};
} // namespace ash
#endif // ASH_LAUNCHER_LAUNCHER_H_
|