| 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 EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ |
| 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "content/public/common/media_stream_request.h" | 9 #include "content/public/common/media_stream_request.h" |
| 10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
| 11 #include "ui/base/window_open_disposition.h" | 11 #include "ui/base/window_open_disposition.h" |
| 12 #include "ui/gfx/image/image_skia.h" | |
| 13 | 12 |
| 14 namespace content { | 13 namespace content { |
| 15 class BrowserContext; | 14 class BrowserContext; |
| 16 class ColorChooser; | 15 class ColorChooser; |
| 17 struct FileChooserParams; | 16 struct FileChooserParams; |
| 18 struct OpenURLParams; | 17 struct OpenURLParams; |
| 19 class WebContents; | 18 class WebContents; |
| 20 } | 19 } |
| 21 | 20 |
| 22 namespace gfx { | 21 namespace gfx { |
| 23 class Rect; | 22 class Rect; |
| 23 class Size; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace extensions { | 26 namespace extensions { |
| 27 | 27 |
| 28 class Extension; | 28 class Extension; |
| 29 | 29 |
| 30 // Interface to give packaged apps access to services in the browser, for things | 30 // Interface to give packaged apps access to services in the browser, for things |
| 31 // like handling links and showing UI prompts to the user. | 31 // like handling links and showing UI prompts to the user. |
| 32 class AppDelegate { | 32 class AppDelegate { |
| 33 public: | 33 public: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 62 content::WebContents* web_contents, | 62 content::WebContents* web_contents, |
| 63 const content::MediaStreamRequest& request, | 63 const content::MediaStreamRequest& request, |
| 64 const content::MediaResponseCallback& callback, | 64 const content::MediaResponseCallback& callback, |
| 65 const Extension* extension) = 0; | 65 const Extension* extension) = 0; |
| 66 virtual bool CheckMediaAccessPermission(content::WebContents* web_contents, | 66 virtual bool CheckMediaAccessPermission(content::WebContents* web_contents, |
| 67 const GURL& security_origin, | 67 const GURL& security_origin, |
| 68 content::MediaStreamType type, | 68 content::MediaStreamType type, |
| 69 const Extension* extension) = 0; | 69 const Extension* extension) = 0; |
| 70 virtual int PreferredIconSize() = 0; | 70 virtual int PreferredIconSize() = 0; |
| 71 | 71 |
| 72 // TODO(jamescook): Eliminate this method. All implementations load the same | |
| 73 // icon, and the icon is available in the extensions module resources. | |
| 74 virtual gfx::ImageSkia GetAppDefaultIcon() = 0; | |
| 75 | |
| 76 // Web contents modal dialog support. | 72 // Web contents modal dialog support. |
| 77 virtual void SetWebContentsBlocked(content::WebContents* web_contents, | 73 virtual void SetWebContentsBlocked(content::WebContents* web_contents, |
| 78 bool blocked) = 0; | 74 bool blocked) = 0; |
| 79 virtual bool IsWebContentsVisible(content::WebContents* web_contents) = 0; | 75 virtual bool IsWebContentsVisible(content::WebContents* web_contents) = 0; |
| 80 | 76 |
| 81 // |callback| will be called when the process is about to terminate. | 77 // |callback| will be called when the process is about to terminate. |
| 82 virtual void SetTerminatingCallback(const base::Closure& callback) = 0; | 78 virtual void SetTerminatingCallback(const base::Closure& callback) = 0; |
| 83 }; | 79 }; |
| 84 | 80 |
| 85 } // namespace extensions | 81 } // namespace extensions |
| 86 | 82 |
| 87 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ | 83 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ |
| OLD | NEW |