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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 10 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 private: | 59 private: |
60 // PlatformAppBrowserTest needs access to web_contents() | 60 // PlatformAppBrowserTest needs access to web_contents() |
61 friend class PlatformAppBrowserTest; | 61 friend class PlatformAppBrowserTest; |
62 | 62 |
63 // Instantiates a platform-specific ShellWindow subclass (one implementation | 63 // Instantiates a platform-specific ShellWindow subclass (one implementation |
64 // per platform). Public users of ShellWindow should use ShellWindow::Create. | 64 // per platform). Public users of ShellWindow should use ShellWindow::Create. |
65 static ShellWindow* CreateImpl(Profile* profile, | 65 static ShellWindow* CreateImpl(Profile* profile, |
66 const Extension* extension, | 66 const Extension* extension, |
67 const GURL& url); | 67 const GURL& url); |
68 | 68 |
69 // content::WebContentsObserver | 69 // content::WebContentsObserver implementation. |
70 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 70 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
71 | 71 |
72 // content::WebContentsDelegate | 72 // content::WebContentsDelegate implementation. |
73 virtual void CloseContents(content::WebContents* contents) OVERRIDE; | 73 virtual void CloseContents(content::WebContents* contents) OVERRIDE; |
74 virtual bool ShouldSuppressDialogs() OVERRIDE; | 74 virtual bool ShouldSuppressDialogs() OVERRIDE; |
75 virtual void WebIntentDispatch( | 75 virtual void WebIntentDispatch( |
76 content::WebContents* web_contents, | 76 content::WebContents* web_contents, |
77 content::WebIntentsDispatcher* intents_dispatcher) OVERRIDE; | 77 content::WebIntentsDispatcher* intents_dispatcher) OVERRIDE; |
| 78 virtual void RunFileChooser( |
| 79 content::WebContents* tab, |
| 80 const content::FileChooserParams& params) OVERRIDE; |
78 | 81 |
79 // content::NotificationObserver implementation. | 82 // content::NotificationObserver implementation. |
80 virtual void Observe(int type, | 83 virtual void Observe(int type, |
81 const content::NotificationSource& source, | 84 const content::NotificationSource& source, |
82 const content::NotificationDetails& details) OVERRIDE; | 85 const content::NotificationDetails& details) OVERRIDE; |
83 | 86 |
| 87 // ExtensionFunctionDispatcher::Delegate implementation. |
84 virtual ExtensionWindowController* GetExtensionWindowController() const | 88 virtual ExtensionWindowController* GetExtensionWindowController() const |
85 OVERRIDE; | 89 OVERRIDE; |
86 | 90 |
87 // Message handlers. | 91 // Message handlers. |
88 void OnRequest(const ExtensionHostMsg_Request_Params& params); | 92 void OnRequest(const ExtensionHostMsg_Request_Params& params); |
89 | 93 |
90 Profile* profile_; // weak pointer - owned by ProfileManager. | 94 Profile* profile_; // weak pointer - owned by ProfileManager. |
91 const Extension* extension_; // weak pointer - owned by ExtensionService. | 95 const Extension* extension_; // weak pointer - owned by ExtensionService. |
92 | 96 |
93 const SessionID session_id_; | 97 const SessionID session_id_; |
94 scoped_ptr<TabContentsWrapper> contents_wrapper_; | 98 scoped_ptr<TabContentsWrapper> contents_wrapper_; |
| 99 // web_contents_ is owned by contents_wrapper_. |
95 content::WebContents* web_contents_; | 100 content::WebContents* web_contents_; |
96 content::NotificationRegistrar registrar_; | 101 content::NotificationRegistrar registrar_; |
97 scoped_ptr<ExtensionWindowController> extension_window_controller_; | 102 scoped_ptr<ExtensionWindowController> extension_window_controller_; |
98 ExtensionFunctionDispatcher extension_function_dispatcher_; | 103 ExtensionFunctionDispatcher extension_function_dispatcher_; |
99 | 104 |
100 DISALLOW_COPY_AND_ASSIGN(ShellWindow); | 105 DISALLOW_COPY_AND_ASSIGN(ShellWindow); |
101 }; | 106 }; |
102 | 107 |
103 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ | 108 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
OLD | NEW |