shell_extension_host_delegate.h revision 1320f92c476a1ad9d19dba2a48c72b75566198e9
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
3// found in the LICENSE file.
4
5#ifndef EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_HOST_DELEGATE_H_
6#define EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_HOST_DELEGATE_H_
7
8#include "base/macros.h"
9#include "extensions/browser/extension_host_delegate.h"
10
11namespace extensions {
12
13// A minimal ExtensionHostDelegate.
14class ShellExtensionHostDelegate : public ExtensionHostDelegate {
15 public:
16  ShellExtensionHostDelegate();
17  virtual ~ShellExtensionHostDelegate();
18
19  // ExtensionHostDelegate implementation.
20  virtual void OnExtensionHostCreated(
21      content::WebContents* web_contents) OVERRIDE;
22  virtual void OnRenderViewCreatedForBackgroundPage(
23      ExtensionHost* host) OVERRIDE;
24  virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager()
25      OVERRIDE;
26  virtual void CreateTab(content::WebContents* web_contents,
27                         const std::string& extension_id,
28                         WindowOpenDisposition disposition,
29                         const gfx::Rect& initial_pos,
30                         bool user_gesture) OVERRIDE;
31  virtual void ProcessMediaAccessRequest(
32      content::WebContents* web_contents,
33      const content::MediaStreamRequest& request,
34      const content::MediaResponseCallback& callback,
35      const Extension* extension) OVERRIDE;
36  virtual bool CheckMediaAccessPermission(content::WebContents* web_contents,
37                                          const GURL& security_origin,
38                                          content::MediaStreamType type,
39                                          const Extension* extension) OVERRIDE;
40
41 private:
42  DISALLOW_COPY_AND_ASSIGN(ShellExtensionHostDelegate);
43};
44
45}  // namespace extensions
46
47#endif  // EXTENSIONS_SHELL_BROWSER_SHELL_EXTENSION_HOST_DELEGATE_H_
48