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.
5 #ifndef APPS_SHELL_BROWSER_SHELL_APP_WINDOW_DELEGATE_H_
6 #define APPS_SHELL_BROWSER_SHELL_APP_WINDOW_DELEGATE_H_
8 #include "apps/app_window.h"
12 // The AppWindow::Delegate for app_shell. Used to create instances of
13 // NativeAppWindow. Other functionality is not supported.
14 class ShellAppWindowDelegate : public AppWindow::Delegate {
16 ShellAppWindowDelegate();
17 virtual ~ShellAppWindowDelegate();
20 // ShellWindow::Delegate:
21 virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE;
22 virtual NativeAppWindow* CreateNativeAppWindow(
24 const AppWindow::CreateParams& params) OVERRIDE;
25 virtual content::WebContents* OpenURLFromTab(
26 content::BrowserContext* context,
27 content::WebContents* source,
28 const content::OpenURLParams& params) OVERRIDE;
29 virtual void AddNewContents(content::BrowserContext* context,
30 content::WebContents* new_contents,
31 WindowOpenDisposition disposition,
32 const gfx::Rect& initial_pos,
34 bool* was_blocked) OVERRIDE;
35 virtual content::ColorChooser* ShowColorChooser(
36 content::WebContents* web_contents,
37 SkColor initial_color) OVERRIDE;
38 virtual void RunFileChooser(content::WebContents* tab,
39 const content::FileChooserParams& params)
41 virtual void RequestMediaAccessPermission(
42 content::WebContents* web_contents,
43 const content::MediaStreamRequest& request,
44 const content::MediaResponseCallback& callback,
45 const extensions::Extension* extension) OVERRIDE;
46 virtual int PreferredIconSize() OVERRIDE;
47 virtual void SetWebContentsBlocked(content::WebContents* web_contents,
48 bool blocked) OVERRIDE;
49 virtual bool IsWebContentsVisible(content::WebContents* web_contents)
52 DISALLOW_COPY_AND_ASSIGN(ShellAppWindowDelegate);
57 #endif // APPS_SHELL_BROWSER_SHELL_APP_WINDOW_DELEGATE_H_