| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ATHENA_EXTENSIONS_CHROME_ATHENA_APP_DELEGATE_H_ | 5 #ifndef ATHENA_EXTENSIONS_SHELL_ATHENA_APP_DELEGATE_H_ |
| 6 #define ATHENA_EXTENSIONS_CHROME_ATHENA_APP_DELEGATE_H_ | 6 #define ATHENA_EXTENSIONS_SHELL_ATHENA_APP_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "athena/extensions/athena_app_delegate_base.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 | 9 |
| 13 namespace athena { | 10 namespace athena { |
| 14 | 11 |
| 15 class AthenaAppDelegate : public extensions::AppDelegate { | 12 class AthenaShellAppDelegate : public AthenaAppDelegateBase { |
| 16 public: | 13 public: |
| 17 AthenaAppDelegate(); | 14 AthenaShellAppDelegate(); |
| 18 virtual ~AthenaAppDelegate(); | 15 virtual ~AthenaShellAppDelegate(); |
| 19 | 16 |
| 20 private: | 17 private: |
| 21 class NewWindowContentsDelegate; | |
| 22 | |
| 23 // extensions::AppDelegate: | 18 // extensions::AppDelegate: |
| 24 virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE; | 19 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( | 20 virtual content::ColorChooser* ShowColorChooser( |
| 38 content::WebContents* web_contents, | 21 content::WebContents* web_contents, |
| 39 SkColor initial_color) OVERRIDE; | 22 SkColor initial_color) OVERRIDE; |
| 40 virtual void RunFileChooser( | 23 virtual void RunFileChooser( |
| 41 content::WebContents* tab, | 24 content::WebContents* tab, |
| 42 const content::FileChooserParams& params) OVERRIDE; | 25 const content::FileChooserParams& params) OVERRIDE; |
| 43 virtual void RequestMediaAccessPermission( | 26 virtual void RequestMediaAccessPermission( |
| 44 content::WebContents* web_contents, | 27 content::WebContents* web_contents, |
| 45 const content::MediaStreamRequest& request, | 28 const content::MediaStreamRequest& request, |
| 46 const content::MediaResponseCallback& callback, | 29 const content::MediaResponseCallback& callback, |
| 47 const extensions::Extension* extension) OVERRIDE; | 30 const extensions::Extension* extension) OVERRIDE; |
| 48 virtual int PreferredIconSize() OVERRIDE; | |
| 49 virtual gfx::ImageSkia GetAppDefaultIcon() OVERRIDE; | |
| 50 virtual void SetWebContentsBlocked(content::WebContents* web_contents, | 31 virtual void SetWebContentsBlocked(content::WebContents* web_contents, |
| 51 bool blocked) OVERRIDE; | 32 bool blocked) OVERRIDE; |
| 52 virtual bool IsWebContentsVisible( | |
| 53 content::WebContents* web_contents) OVERRIDE; | |
| 54 virtual void SetTerminatingCallback(const base::Closure& callback) OVERRIDE; | |
| 55 | 33 |
| 56 scoped_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; | 34 DISALLOW_COPY_AND_ASSIGN(AthenaShellAppDelegate); |
| 57 base::Closure terminating_callback_; | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(AthenaAppDelegate); | |
| 60 }; | 35 }; |
| 61 | 36 |
| 62 } // namespace athena | 37 } // namespace athena |
| 63 | 38 |
| 64 #endif // ATHENA_EXTENSIONS_CHROME_ATHENA_APP_DELEGATE_H_ | 39 #endif // ATHENA_EXTENSIONS_SHELL_ATHENA_APP_DELEGATE_H_ |
| OLD | NEW |