| 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 CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_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 "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // while this object exists. | 27 // while this object exists. |
| 28 explicit ChromeAppDelegate(scoped_ptr<ScopedKeepAlive> keep_alive); | 28 explicit ChromeAppDelegate(scoped_ptr<ScopedKeepAlive> keep_alive); |
| 29 virtual ~ChromeAppDelegate(); | 29 virtual ~ChromeAppDelegate(); |
| 30 | 30 |
| 31 static void DisableExternalOpenForTesting(); | 31 static void DisableExternalOpenForTesting(); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 class NewWindowContentsDelegate; | 34 class NewWindowContentsDelegate; |
| 35 | 35 |
| 36 // extensions::AppDelegate: | 36 // extensions::AppDelegate: |
| 37 virtual void InitWebContents(content::WebContents* web_contents) OVERRIDE; | 37 virtual void InitWebContents(content::WebContents* web_contents) override; |
| 38 virtual void ResizeWebContents(content::WebContents* web_contents, | 38 virtual void ResizeWebContents(content::WebContents* web_contents, |
| 39 const gfx::Size& size) OVERRIDE; | 39 const gfx::Size& size) override; |
| 40 virtual content::WebContents* OpenURLFromTab( | 40 virtual content::WebContents* OpenURLFromTab( |
| 41 content::BrowserContext* context, | 41 content::BrowserContext* context, |
| 42 content::WebContents* source, | 42 content::WebContents* source, |
| 43 const content::OpenURLParams& params) OVERRIDE; | 43 const content::OpenURLParams& params) override; |
| 44 virtual void AddNewContents(content::BrowserContext* context, | 44 virtual void AddNewContents(content::BrowserContext* context, |
| 45 content::WebContents* new_contents, | 45 content::WebContents* new_contents, |
| 46 WindowOpenDisposition disposition, | 46 WindowOpenDisposition disposition, |
| 47 const gfx::Rect& initial_pos, | 47 const gfx::Rect& initial_pos, |
| 48 bool user_gesture, | 48 bool user_gesture, |
| 49 bool* was_blocked) OVERRIDE; | 49 bool* was_blocked) override; |
| 50 virtual content::ColorChooser* ShowColorChooser( | 50 virtual content::ColorChooser* ShowColorChooser( |
| 51 content::WebContents* web_contents, | 51 content::WebContents* web_contents, |
| 52 SkColor initial_color) OVERRIDE; | 52 SkColor initial_color) override; |
| 53 virtual void RunFileChooser( | 53 virtual void RunFileChooser( |
| 54 content::WebContents* tab, | 54 content::WebContents* tab, |
| 55 const content::FileChooserParams& params) OVERRIDE; | 55 const content::FileChooserParams& params) override; |
| 56 virtual void RequestMediaAccessPermission( | 56 virtual void RequestMediaAccessPermission( |
| 57 content::WebContents* web_contents, | 57 content::WebContents* web_contents, |
| 58 const content::MediaStreamRequest& request, | 58 const content::MediaStreamRequest& request, |
| 59 const content::MediaResponseCallback& callback, | 59 const content::MediaResponseCallback& callback, |
| 60 const extensions::Extension* extension) OVERRIDE; | 60 const extensions::Extension* extension) override; |
| 61 virtual bool CheckMediaAccessPermission( | 61 virtual bool CheckMediaAccessPermission( |
| 62 content::WebContents* web_contents, | 62 content::WebContents* web_contents, |
| 63 const GURL& security_origin, | 63 const GURL& security_origin, |
| 64 content::MediaStreamType type, | 64 content::MediaStreamType type, |
| 65 const extensions::Extension* extension) OVERRIDE; | 65 const extensions::Extension* extension) override; |
| 66 virtual int PreferredIconSize() OVERRIDE; | 66 virtual int PreferredIconSize() override; |
| 67 virtual void SetWebContentsBlocked(content::WebContents* web_contents, | 67 virtual void SetWebContentsBlocked(content::WebContents* web_contents, |
| 68 bool blocked) OVERRIDE; | 68 bool blocked) override; |
| 69 virtual bool IsWebContentsVisible( | 69 virtual bool IsWebContentsVisible( |
| 70 content::WebContents* web_contents) OVERRIDE; | 70 content::WebContents* web_contents) override; |
| 71 virtual void SetTerminatingCallback(const base::Closure& callback) OVERRIDE; | 71 virtual void SetTerminatingCallback(const base::Closure& callback) override; |
| 72 | 72 |
| 73 // content::NotificationObserver: | 73 // content::NotificationObserver: |
| 74 virtual void Observe(int type, | 74 virtual void Observe(int type, |
| 75 const content::NotificationSource& source, | 75 const content::NotificationSource& source, |
| 76 const content::NotificationDetails& details) OVERRIDE; | 76 const content::NotificationDetails& details) override; |
| 77 | 77 |
| 78 scoped_ptr<ScopedKeepAlive> keep_alive_; | 78 scoped_ptr<ScopedKeepAlive> keep_alive_; |
| 79 scoped_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; | 79 scoped_ptr<NewWindowContentsDelegate> new_window_contents_delegate_; |
| 80 base::Closure terminating_callback_; | 80 base::Closure terminating_callback_; |
| 81 content::NotificationRegistrar registrar_; | 81 content::NotificationRegistrar registrar_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(ChromeAppDelegate); | 83 DISALLOW_COPY_AND_ASSIGN(ChromeAppDelegate); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 #endif // CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ | 86 #endif // CHROME_BROWSER_UI_APPS_CHROME_APP_DELEGATE_H_ |
| OLD | NEW |