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 |
136 // content::WebContentsObserver implementation. | 141 // content::WebContentsObserver implementation. |
137 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 142 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
138 | 143 |
139 // content::WebContentsDelegate implementation. | 144 // content::WebContentsDelegate implementation. |
140 virtual void CloseContents(content::WebContents* contents) OVERRIDE; | 145 virtual void CloseContents(content::WebContents* contents) OVERRIDE; |
141 virtual bool ShouldSuppressDialogs() OVERRIDE; | 146 virtual bool ShouldSuppressDialogs() OVERRIDE; |
142 virtual void WebIntentDispatch( | 147 virtual void WebIntentDispatch( |
143 content::WebContents* web_contents, | 148 content::WebContents* web_contents, |
144 content::WebIntentsDispatcher* intents_dispatcher) OVERRIDE; | 149 content::WebIntentsDispatcher* intents_dispatcher) OVERRIDE; |
145 virtual void RunFileChooser( | 150 virtual void RunFileChooser( |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 scoped_ptr<NativeAppWindow> native_app_window_; | 245 scoped_ptr<NativeAppWindow> native_app_window_; |
241 | 246 |
242 base::WeakPtrFactory<ShellWindow> weak_ptr_factory_; | 247 base::WeakPtrFactory<ShellWindow> weak_ptr_factory_; |
243 | 248 |
244 base::WeakPtrFactory<ShellWindow> image_loader_ptr_factory_; | 249 base::WeakPtrFactory<ShellWindow> image_loader_ptr_factory_; |
245 | 250 |
246 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 251 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
247 }; | 252 }; |
248 | 253 |
249 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 254 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
OLD | NEW |