| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // 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 | 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_ASH_CHROME_SHELL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/launcher/launcher_types.h" | 9 #include "ash/launcher/launcher_types.h" |
| 10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
| 15 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
| 16 | 16 |
| 17 class StatusAreaHostAura; | |
| 18 class StatusAreaView; | |
| 19 class WindowPositioner; | 17 class WindowPositioner; |
| 20 | 18 |
| 21 namespace views { | 19 namespace views { |
| 22 class View; | 20 class View; |
| 23 } | 21 } |
| 24 | 22 |
| 25 class ChromeShellDelegate : public ash::ShellDelegate, | 23 class ChromeShellDelegate : public ash::ShellDelegate, |
| 26 public content::NotificationObserver { | 24 public content::NotificationObserver { |
| 27 public: | 25 public: |
| 28 ChromeShellDelegate(); | 26 ChromeShellDelegate(); |
| 29 virtual ~ChromeShellDelegate(); | 27 virtual ~ChromeShellDelegate(); |
| 30 | 28 |
| 31 static ChromeShellDelegate* instance() { return instance_; } | 29 static ChromeShellDelegate* instance() { return instance_; } |
| 32 | 30 |
| 33 StatusAreaHostAura* status_area_host() { | |
| 34 return status_area_host_.get(); | |
| 35 } | |
| 36 | |
| 37 StatusAreaView* GetStatusArea(); | |
| 38 | |
| 39 WindowPositioner* window_positioner() { return window_positioner_.get(); } | 31 WindowPositioner* window_positioner() { return window_positioner_.get(); } |
| 40 | 32 |
| 41 // ash::ShellDelegate overrides; | 33 // ash::ShellDelegate overrides; |
| 42 virtual views::Widget* CreateStatusArea() OVERRIDE; | |
| 43 virtual bool IsUserLoggedIn() OVERRIDE; | 34 virtual bool IsUserLoggedIn() OVERRIDE; |
| 44 virtual void LockScreen() OVERRIDE; | 35 virtual void LockScreen() OVERRIDE; |
| 45 virtual void UnlockScreen() OVERRIDE; | 36 virtual void UnlockScreen() OVERRIDE; |
| 46 virtual bool IsScreenLocked() const OVERRIDE; | 37 virtual bool IsScreenLocked() const OVERRIDE; |
| 47 virtual void Exit() OVERRIDE; | 38 virtual void Exit() OVERRIDE; |
| 48 virtual void NewWindow(bool is_incognito) OVERRIDE; | 39 virtual void NewWindow(bool is_incognito) OVERRIDE; |
| 49 virtual ash::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE; | 40 virtual ash::AppListViewDelegate* CreateAppListViewDelegate() OVERRIDE; |
| 50 virtual void StartPartialScreenshot( | 41 virtual void StartPartialScreenshot( |
| 51 ash::ScreenshotDelegate* screenshot_delegate) OVERRIDE; | 42 ash::ScreenshotDelegate* screenshot_delegate) OVERRIDE; |
| 52 virtual ash::LauncherDelegate* CreateLauncherDelegate( | 43 virtual ash::LauncherDelegate* CreateLauncherDelegate( |
| 53 ash::LauncherModel* model) OVERRIDE; | 44 ash::LauncherModel* model) OVERRIDE; |
| 54 virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate( | 45 virtual ash::SystemTrayDelegate* CreateSystemTrayDelegate( |
| 55 ash::SystemTray* tray) OVERRIDE; | 46 ash::SystemTray* tray) OVERRIDE; |
| 56 virtual ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE; | 47 virtual ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE; |
| 57 | 48 |
| 58 // content::NotificationObserver override: | 49 // content::NotificationObserver override: |
| 59 virtual void Observe(int type, | 50 virtual void Observe(int type, |
| 60 const content::NotificationSource& source, | 51 const content::NotificationSource& source, |
| 61 const content::NotificationDetails& details) OVERRIDE; | 52 const content::NotificationDetails& details) OVERRIDE; |
| 62 | 53 |
| 63 private: | 54 private: |
| 64 static ChromeShellDelegate* instance_; | 55 static ChromeShellDelegate* instance_; |
| 65 | 56 |
| 66 content::NotificationRegistrar registrar_; | 57 content::NotificationRegistrar registrar_; |
| 67 | 58 |
| 68 scoped_ptr<StatusAreaHostAura> status_area_host_; | |
| 69 scoped_ptr<WindowPositioner> window_positioner_; | 59 scoped_ptr<WindowPositioner> window_positioner_; |
| 70 | 60 |
| 71 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); | 61 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); |
| 72 }; | 62 }; |
| 73 | 63 |
| 74 #endif // CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ | 64 #endif // CHROME_BROWSER_UI_VIEWS_ASH_CHROME_SHELL_DELEGATE_H_ |
| OLD | NEW |