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_ASH_CHROME_SHELL_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ash/launcher/launcher_types.h" | 10 #include "ash/launcher/launcher_types.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 virtual ui::MenuModel* CreateContextMenu(aura::RootWindow* root) OVERRIDE; | 97 virtual ui::MenuModel* CreateContextMenu(aura::RootWindow* root) OVERRIDE; |
98 virtual ash::RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE; | 98 virtual ash::RootWindowHostFactory* CreateRootWindowHostFactory() OVERRIDE; |
99 virtual string16 GetProductName() const OVERRIDE; | 99 virtual string16 GetProductName() const OVERRIDE; |
100 | 100 |
101 // content::NotificationObserver override: | 101 // content::NotificationObserver override: |
102 virtual void Observe(int type, | 102 virtual void Observe(int type, |
103 const content::NotificationSource& source, | 103 const content::NotificationSource& source, |
104 const content::NotificationDetails& details) OVERRIDE; | 104 const content::NotificationDetails& details) OVERRIDE; |
105 | 105 |
106 private: | 106 private: |
| 107 class TabRestoreHelper; |
| 108 |
107 void PlatformInit(); | 109 void PlatformInit(); |
108 | 110 |
109 // Returns the browser for active ash window if any. Otherwise it searches | 111 // Returns the browser for active ash window if any. Otherwise it searches |
110 // for a browser or create one for default profile and returns it. | 112 // for a browser or create one for default profile and returns it. |
111 Browser* GetTargetBrowser(); | 113 Browser* GetTargetBrowser(); |
112 | 114 |
113 static ChromeShellDelegate* instance_; | 115 static ChromeShellDelegate* instance_; |
114 | 116 |
115 content::NotificationRegistrar registrar_; | 117 content::NotificationRegistrar registrar_; |
116 | 118 |
117 scoped_ptr<ash::WindowPositioner> window_positioner_; | 119 scoped_ptr<ash::WindowPositioner> window_positioner_; |
118 | 120 |
119 base::WeakPtrFactory<ChromeShellDelegate> weak_factory_; | 121 base::WeakPtrFactory<ChromeShellDelegate> weak_factory_; |
120 | 122 |
121 ChromeLauncherController* launcher_delegate_; | 123 ChromeLauncherController* launcher_delegate_; |
122 | 124 |
| 125 scoped_ptr<TabRestoreHelper> tab_restore_helper_; |
| 126 |
123 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); | 127 DISALLOW_COPY_AND_ASSIGN(ChromeShellDelegate); |
124 }; | 128 }; |
125 | 129 |
126 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ | 130 #endif // CHROME_BROWSER_UI_ASH_CHROME_SHELL_DELEGATE_H_ |
OLD | NEW |