OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_AURA_CHROME_SHELL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AURA_CHROME_SHELL_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AURA_CHROME_SHELL_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AURA_CHROME_SHELL_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "ui/aura_shell/launcher/launcher_types.h" | 12 #include "ui/aura_shell/launcher/launcher_types.h" |
13 #include "ui/aura_shell/shell_delegate.h" | 13 #include "ui/aura_shell/shell_delegate.h" |
14 | 14 |
15 class Browser; | 15 class Browser; |
16 class StatusAreaHostAura; | 16 class StatusAreaHostAura; |
17 | 17 |
18 namespace views { | 18 namespace views { |
19 class View; | 19 class View; |
20 } | 20 } |
21 | 21 |
22 class ChromeShellDelegate : public aura_shell::ShellDelegate { | 22 class ChromeShellDelegate : public aura_shell::ShellDelegate { |
23 public: | 23 public: |
24 ChromeShellDelegate(); | 24 ChromeShellDelegate(); |
25 virtual ~ChromeShellDelegate(); | 25 virtual ~ChromeShellDelegate(); |
26 | 26 |
27 static ChromeShellDelegate* instance() { return instance_; } | 27 static ChromeShellDelegate* instance() { return instance_; } |
28 | 28 |
29 const views::View* GetStatusArea() const; | 29 views::View* GetStatusAreaForTest(); |
30 | 30 |
31 // Returns whether a launcher item should be created for |browser|. If an item | 31 // Returns whether a launcher item should be created for |browser|. If an item |
32 // should be created |type| is set to the launcher type to create. | 32 // should be created |type| is set to the launcher type to create. |
33 static bool ShouldCreateLauncherItemForBrowser( | 33 static bool ShouldCreateLauncherItemForBrowser( |
34 Browser* browser, | 34 Browser* browser, |
35 aura_shell::LauncherItemType* type); | 35 aura_shell::LauncherItemType* type); |
36 | 36 |
37 // aura_shell::ShellDelegate overrides; | 37 // aura_shell::ShellDelegate overrides; |
38 virtual void CreateNewWindow() OVERRIDE; | 38 virtual void CreateNewWindow() OVERRIDE; |
39 virtual views::Widget* CreateStatusArea() OVERRIDE; | 39 virtual views::Widget* CreateStatusArea() OVERRIDE; |
40 virtual void ShowApps() OVERRIDE; | 40 virtual void ShowApps() OVERRIDE; |
41 virtual void LauncherItemClicked( | 41 virtual void LauncherItemClicked( |
42 const aura_shell::LauncherItem& item) OVERRIDE; | 42 const aura_shell::LauncherItem& item) OVERRIDE; |
43 virtual bool ConfigureLauncherItem(aura_shell::LauncherItem* item) OVERRIDE; | 43 virtual bool ConfigureLauncherItem(aura_shell::LauncherItem* item) OVERRIDE; |
44 | 44 |
45 private: | 45 private: |
46 static ChromeShellDelegate* instance_; | 46 static ChromeShellDelegate* instance_; |
47 | 47 |
48 scoped_ptr<StatusAreaHostAura> status_area_host_; | 48 scoped_ptr<StatusAreaHostAura> status_area_host_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); | 50 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); |
51 }; | 51 }; |
52 | 52 |
53 #endif // CHROME_BROWSER_UI_VIEWS_AURA_CHROME_SHELL_DELEGATE_H_ | 53 #endif // CHROME_BROWSER_UI_VIEWS_AURA_CHROME_SHELL_DELEGATE_H_ |
OLD | NEW |