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