| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 virtual ~ShellWindow(); | 126 virtual ~ShellWindow(); |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 // PlatformAppBrowserTest needs access to web_contents() | 129 // PlatformAppBrowserTest needs access to web_contents() |
| 130 friend class extensions::PlatformAppBrowserTest; | 130 friend class extensions::PlatformAppBrowserTest; |
| 131 | 131 |
| 132 // Instantiates a platform-specific ShellWindow subclass (one implementation | 132 // Instantiates a platform-specific ShellWindow subclass (one implementation |
| 133 // per platform). Public users of ShellWindow should use ShellWindow::Create. | 133 // per platform). Public users of ShellWindow should use ShellWindow::Create. |
| 134 void Init(const GURL& url, const CreateParams& params); | 134 void Init(const GURL& url, const CreateParams& params); |
| 135 | 135 |
| 136 // Remove the window from the ShellWindowRegistry and tell the native | |
| 137 // window to close. The native window won't be actually closed until | |
| 138 // OnNativeClose(). | |
| 139 void Close(); | |
| 140 | |
| 141 // content::WebContentsObserver implementation. | 136 // content::WebContentsObserver implementation. |
| 142 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 137 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 143 | 138 |
| 144 // content::WebContentsDelegate implementation. | 139 // content::WebContentsDelegate implementation. |
| 145 virtual void CloseContents(content::WebContents* contents) OVERRIDE; | 140 virtual void CloseContents(content::WebContents* contents) OVERRIDE; |
| 146 virtual bool ShouldSuppressDialogs() OVERRIDE; | 141 virtual bool ShouldSuppressDialogs() OVERRIDE; |
| 147 virtual void RunFileChooser( | 142 virtual void RunFileChooser( |
| 148 content::WebContents* tab, | 143 content::WebContents* tab, |
| 149 const content::FileChooserParams& params) OVERRIDE; | 144 const content::FileChooserParams& params) OVERRIDE; |
| 150 virtual bool IsPopupOrPanel( | 145 virtual bool IsPopupOrPanel( |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 scoped_ptr<NativeAppWindow> native_app_window_; | 237 scoped_ptr<NativeAppWindow> native_app_window_; |
| 243 | 238 |
| 244 base::WeakPtrFactory<ShellWindow> weak_ptr_factory_; | 239 base::WeakPtrFactory<ShellWindow> weak_ptr_factory_; |
| 245 | 240 |
| 246 base::WeakPtrFactory<ShellWindow> image_loader_ptr_factory_; | 241 base::WeakPtrFactory<ShellWindow> image_loader_ptr_factory_; |
| 247 | 242 |
| 248 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 243 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
| 249 }; | 244 }; |
| 250 | 245 |
| 251 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 246 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
| OLD | NEW |