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