| 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_EXTENSIONS_SHELL_WINDOW_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| 6 #define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 6 #define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 10 #include "chrome/browser/extensions/extension_keybinding_registry.h" | 10 #include "chrome/browser/extensions/extension_keybinding_registry.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // is on startup and from within UpdateWindowTitle(). | 99 // is on startup and from within UpdateWindowTitle(). |
| 100 virtual string16 GetTitle() const; | 100 virtual string16 GetTitle() const; |
| 101 | 101 |
| 102 // Call to notify ShellRegistry and delete the window. Subclasses should | 102 // Call to notify ShellRegistry and delete the window. Subclasses should |
| 103 // invoke this method instead of using "delete this". | 103 // invoke this method instead of using "delete this". |
| 104 void OnNativeClose(); | 104 void OnNativeClose(); |
| 105 | 105 |
| 106 // Save the window position in the prefs. | 106 // Save the window position in the prefs. |
| 107 virtual void SaveWindowPosition(); | 107 virtual void SaveWindowPosition(); |
| 108 | 108 |
| 109 // Sends an update message with the current bounds to the renderer. |
| 110 void SendBoundsUpdate(); |
| 111 |
| 109 protected: | 112 protected: |
| 110 ShellWindow(Profile* profile, | 113 ShellWindow(Profile* profile, |
| 111 const extensions::Extension* extension); | 114 const extensions::Extension* extension); |
| 112 virtual ~ShellWindow(); | 115 virtual ~ShellWindow(); |
| 113 | 116 |
| 114 private: | 117 private: |
| 115 // PlatformAppBrowserTest needs access to web_contents() | 118 // PlatformAppBrowserTest needs access to web_contents() |
| 116 friend class extensions::PlatformAppBrowserTest; | 119 friend class extensions::PlatformAppBrowserTest; |
| 117 | 120 |
| 118 // Instantiates a platform-specific ShellWindow subclass (one implementation | 121 // Instantiates a platform-specific ShellWindow subclass (one implementation |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 210 |
| 208 // Used for loading app_icon_. | 211 // Used for loading app_icon_. |
| 209 scoped_ptr<ImageLoadingTracker> app_icon_loader_; | 212 scoped_ptr<ImageLoadingTracker> app_icon_loader_; |
| 210 | 213 |
| 211 scoped_ptr<NativeShellWindow> native_window_; | 214 scoped_ptr<NativeShellWindow> native_window_; |
| 212 | 215 |
| 213 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 216 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
| 214 }; | 217 }; |
| 215 | 218 |
| 216 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 219 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| OLD | NEW |