| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_CHROME_EXTENSION_HOST_DELEGATE_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_HOST_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_HOST_DELEGATE_H_ | 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" |
| 8 #include "extensions/browser/extension_host_delegate.h" | 9 #include "extensions/browser/extension_host_delegate.h" |
| 9 | 10 |
| 10 namespace extensions { | 11 namespace extensions { |
| 11 | 12 |
| 12 // Chrome support for ExtensionHost. | 13 // A minimal ExtensionHostDelegate. |
| 13 class ChromeExtensionHostDelegate : public ExtensionHostDelegate { | 14 class ShellExtensionHostDelegate : public ExtensionHostDelegate { |
| 14 public: | 15 public: |
| 15 ChromeExtensionHostDelegate(); | 16 ShellExtensionHostDelegate(); |
| 16 virtual ~ChromeExtensionHostDelegate(); | 17 virtual ~ShellExtensionHostDelegate(); |
| 17 | 18 |
| 18 // ExtensionHostDelegate implementation. | 19 // ExtensionHostDelegate implementation. |
| 19 virtual void OnExtensionHostCreated(content::WebContents* web_contents) | 20 virtual void OnExtensionHostCreated( |
| 20 OVERRIDE; | 21 content::WebContents* web_contents) OVERRIDE; |
| 21 virtual void OnRenderViewCreatedForBackgroundPage(ExtensionHost* host) | 22 virtual void OnRenderViewCreatedForBackgroundPage( |
| 22 OVERRIDE; | 23 ExtensionHost* host) OVERRIDE; |
| 23 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() | 24 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() |
| 24 OVERRIDE; | 25 OVERRIDE; |
| 25 virtual void CreateTab(content::WebContents* web_contents, | 26 virtual void CreateTab(content::WebContents* web_contents, |
| 26 const std::string& extension_id, | 27 const std::string& extension_id, |
| 27 WindowOpenDisposition disposition, | 28 WindowOpenDisposition disposition, |
| 28 const gfx::Rect& initial_pos, | 29 const gfx::Rect& initial_pos, |
| 29 bool user_gesture) OVERRIDE; | 30 bool user_gesture) OVERRIDE; |
| 30 virtual void ProcessMediaAccessRequest( | 31 virtual void ProcessMediaAccessRequest( |
| 31 content::WebContents* web_contents, | 32 content::WebContents* web_contents, |
| 32 const content::MediaStreamRequest& request, | 33 const content::MediaStreamRequest& request, |
| 33 const content::MediaResponseCallback& callback, | 34 const content::MediaResponseCallback& callback, |
| 34 const Extension* extension) OVERRIDE; | 35 const Extension* extension) OVERRIDE; |
| 36 |
| 37 private: |
| 38 DISALLOW_COPY_AND_ASSIGN(ShellExtensionHostDelegate); |
| 35 }; | 39 }; |
| 36 | 40 |
| 37 } // namespace extensions | 41 } // namespace extensions |
| 38 | 42 |
| 39 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSION_HOST_DELEGATE_H_ | 43 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_HOST_DELEGATE_H_ |
| OLD | NEW |