Upstream version 7.35.144.0
[platform/framework/web/crosswalk.git] / src / apps / shell / browser / shell_app_window_delegate.h
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 APPS_SHELL_BROWSER_SHELL_APP_WINDOW_DELEGATE_H_
6 #define APPS_SHELL_BROWSER_SHELL_APP_WINDOW_DELEGATE_H_
7
8 #include "apps/app_window.h"
9
10 namespace apps {
11
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 {
15  public:
16   ShellAppWindowDelegate();
17   virtual ~ShellAppWindowDelegate();
18
19  private:
20   // ShellWindow::Delegate:
21   virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE;
22   virtual NativeAppWindow* CreateNativeAppWindow(
23       AppWindow* window,
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,
33                               bool user_gesture,
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)
40       OVERRIDE;
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)
50       OVERRIDE;
51
52   DISALLOW_COPY_AND_ASSIGN(ShellAppWindowDelegate);
53 };
54
55 }  // namespace apps
56
57 #endif  // APPS_SHELL_BROWSER_SHELL_APP_WINDOW_DELEGATE_H_