| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // is on startup and from within UpdateWindowTitle(). | 90 // is on startup and from within UpdateWindowTitle(). |
| 91 virtual string16 GetTitle() const; | 91 virtual string16 GetTitle() const; |
| 92 | 92 |
| 93 // Call to notify ShellRegistry and delete the window. Subclasses should | 93 // Call to notify ShellRegistry and delete the window. Subclasses should |
| 94 // invoke this method instead of using "delete this". | 94 // invoke this method instead of using "delete this". |
| 95 void OnNativeClose(); | 95 void OnNativeClose(); |
| 96 | 96 |
| 97 // Save the window position in the prefs. | 97 // Save the window position in the prefs. |
| 98 virtual void SaveWindowPosition(); | 98 virtual void SaveWindowPosition(); |
| 99 | 99 |
| 100 // Set the WebContentsDelegate for external url in test. |
| 101 static void SetExternalUrlControllerForTesting( |
| 102 content::WebContentsDelegate* controller); |
| 103 |
| 100 protected: | 104 protected: |
| 101 ShellWindow(Profile* profile, | 105 ShellWindow(Profile* profile, |
| 102 const extensions::Extension* extension); | 106 const extensions::Extension* extension); |
| 103 virtual ~ShellWindow(); | 107 virtual ~ShellWindow(); |
| 104 | 108 |
| 105 private: | 109 private: |
| 106 // PlatformAppBrowserTest needs access to web_contents() | 110 // PlatformAppBrowserTest needs access to web_contents() |
| 107 friend class extensions::PlatformAppBrowserTest; | 111 friend class extensions::PlatformAppBrowserTest; |
| 108 | 112 |
| 109 // Instantiates a platform-specific ShellWindow subclass (one implementation | 113 // Instantiates a platform-specific ShellWindow subclass (one implementation |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 204 |
| 201 // Used for loading app_icon_. | 205 // Used for loading app_icon_. |
| 202 scoped_ptr<ImageLoadingTracker> app_icon_loader_; | 206 scoped_ptr<ImageLoadingTracker> app_icon_loader_; |
| 203 | 207 |
| 204 scoped_ptr<NativeShellWindow> native_window_; | 208 scoped_ptr<NativeShellWindow> native_window_; |
| 205 | 209 |
| 206 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 210 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
| 207 }; | 211 }; |
| 208 | 212 |
| 209 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 213 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| OLD | NEW |