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 | 12 |
13 namespace content { | 13 namespace content { |
14 class BrowserContext; | 14 class BrowserContext; |
15 class ColorChooser; | 15 class ColorChooser; |
| 16 class RenderFrameHost; |
| 17 class RenderViewHost; |
| 18 class WebContents; |
16 struct FileChooserParams; | 19 struct FileChooserParams; |
17 struct OpenURLParams; | 20 struct OpenURLParams; |
18 class RenderViewHost; | |
19 class WebContents; | |
20 } | 21 } |
21 | 22 |
22 namespace gfx { | 23 namespace gfx { |
23 class Rect; | 24 class Rect; |
24 class Size; | 25 class Size; |
25 } | 26 } |
26 | 27 |
27 namespace extensions { | 28 namespace extensions { |
28 | 29 |
29 class Extension; | 30 class Extension; |
(...skipping 21 matching lines...) Expand all Loading... |
51 content::WebContents* new_contents, | 52 content::WebContents* new_contents, |
52 WindowOpenDisposition disposition, | 53 WindowOpenDisposition disposition, |
53 const gfx::Rect& initial_rect, | 54 const gfx::Rect& initial_rect, |
54 bool user_gesture, | 55 bool user_gesture, |
55 bool* was_blocked) = 0; | 56 bool* was_blocked) = 0; |
56 | 57 |
57 // Feature support. | 58 // Feature support. |
58 virtual content::ColorChooser* ShowColorChooser( | 59 virtual content::ColorChooser* ShowColorChooser( |
59 content::WebContents* web_contents, | 60 content::WebContents* web_contents, |
60 SkColor initial_color) = 0; | 61 SkColor initial_color) = 0; |
61 virtual void RunFileChooser(content::WebContents* tab, | 62 virtual void RunFileChooser(content::RenderFrameHost* render_frame_host, |
62 const content::FileChooserParams& params) = 0; | 63 const content::FileChooserParams& params) = 0; |
63 virtual void RequestMediaAccessPermission( | 64 virtual void RequestMediaAccessPermission( |
64 content::WebContents* web_contents, | 65 content::WebContents* web_contents, |
65 const content::MediaStreamRequest& request, | 66 const content::MediaStreamRequest& request, |
66 const content::MediaResponseCallback& callback, | 67 const content::MediaResponseCallback& callback, |
67 const Extension* extension) = 0; | 68 const Extension* extension) = 0; |
68 virtual bool CheckMediaAccessPermission(content::WebContents* web_contents, | 69 virtual bool CheckMediaAccessPermission(content::WebContents* web_contents, |
69 const GURL& security_origin, | 70 const GURL& security_origin, |
70 content::MediaStreamType type, | 71 content::MediaStreamType type, |
71 const Extension* extension) = 0; | 72 const Extension* extension) = 0; |
72 virtual int PreferredIconSize() = 0; | 73 virtual int PreferredIconSize() = 0; |
73 | 74 |
74 // Web contents modal dialog support. | 75 // Web contents modal dialog support. |
75 virtual void SetWebContentsBlocked(content::WebContents* web_contents, | 76 virtual void SetWebContentsBlocked(content::WebContents* web_contents, |
76 bool blocked) = 0; | 77 bool blocked) = 0; |
77 virtual bool IsWebContentsVisible(content::WebContents* web_contents) = 0; | 78 virtual bool IsWebContentsVisible(content::WebContents* web_contents) = 0; |
78 | 79 |
79 // |callback| will be called when the process is about to terminate. | 80 // |callback| will be called when the process is about to terminate. |
80 virtual void SetTerminatingCallback(const base::Closure& callback) = 0; | 81 virtual void SetTerminatingCallback(const base::Closure& callback) = 0; |
81 | 82 |
82 // Called when the app is hidden or shown. | 83 // Called when the app is hidden or shown. |
83 virtual void OnHide() = 0; | 84 virtual void OnHide() = 0; |
84 virtual void OnShow() = 0; | 85 virtual void OnShow() = 0; |
85 }; | 86 }; |
86 | 87 |
87 } // namespace extensions | 88 } // namespace extensions |
88 | 89 |
89 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ | 90 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_DELEGATE_H_ |
OLD | NEW |