shell_app_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_APP_DELEGATE_H_ 6#define EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ 7 8#include "extensions/browser/app_window/app_delegate.h" 9 10namespace extensions { 11 12// app_shell's AppDelegate implementation. 13class ShellAppDelegate : public AppDelegate { 14 public: 15 ShellAppDelegate(); 16 virtual ~ShellAppDelegate(); 17 18 // AppDelegate overrides: 19 virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE; 20 virtual void ResizeWebContents(content::WebContents* web_contents, 21 const gfx::Size& size) OVERRIDE; 22 virtual content::WebContents* OpenURLFromTab( 23 content::BrowserContext* context, 24 content::WebContents* source, 25 const content::OpenURLParams& params) OVERRIDE; 26 virtual void AddNewContents(content::BrowserContext* context, 27 content::WebContents* new_contents, 28 WindowOpenDisposition disposition, 29 const gfx::Rect& initial_pos, 30 bool user_gesture, 31 bool* was_blocked) OVERRIDE; 32 virtual content::ColorChooser* ShowColorChooser( 33 content::WebContents* web_contents, 34 SkColor initial_color) OVERRIDE; 35 virtual void RunFileChooser( 36 content::WebContents* tab, 37 const content::FileChooserParams& params) OVERRIDE; 38 virtual void RequestMediaAccessPermission( 39 content::WebContents* web_contents, 40 const content::MediaStreamRequest& request, 41 const content::MediaResponseCallback& callback, 42 const Extension* extension) OVERRIDE; 43 virtual bool CheckMediaAccessPermission(content::WebContents* web_contents, 44 const GURL& security_origin, 45 content::MediaStreamType type, 46 const Extension* extension) OVERRIDE; 47 virtual int PreferredIconSize() OVERRIDE; 48 virtual void SetWebContentsBlocked(content::WebContents* web_contents, 49 bool blocked) OVERRIDE; 50 virtual bool IsWebContentsVisible( 51 content::WebContents* web_contents) OVERRIDE; 52 virtual void SetTerminatingCallback(const base::Closure& callback) OVERRIDE; 53 54 private: 55 DISALLOW_COPY_AND_ASSIGN(ShellAppDelegate); 56}; 57 58} // namespace extensions 59 60#endif // EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ 61