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_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ |
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ | 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ |
7 | 7 |
8 #include "extensions/browser/app_window/app_delegate.h" | 8 #include "extensions/browser/app_window/app_delegate.h" |
9 | 9 |
10 namespace extensions { | 10 namespace extensions { |
11 | 11 |
12 // app_shell's AppDelegate implementation. | 12 // app_shell's AppDelegate implementation. |
13 class ShellAppDelegate : public AppDelegate { | 13 class ShellAppDelegate : public AppDelegate { |
14 public: | 14 public: |
15 ShellAppDelegate(); | 15 ShellAppDelegate(); |
16 virtual ~ShellAppDelegate(); | 16 ~ShellAppDelegate() override; |
17 | 17 |
18 // AppDelegate overrides: | 18 // AppDelegate overrides: |
19 virtual void InitWebContents(content::WebContents* web_contents) override; | 19 void InitWebContents(content::WebContents* web_contents) override; |
20 virtual void ResizeWebContents(content::WebContents* web_contents, | 20 void ResizeWebContents(content::WebContents* web_contents, |
21 const gfx::Size& size) override; | 21 const gfx::Size& size) override; |
22 virtual content::WebContents* OpenURLFromTab( | 22 content::WebContents* OpenURLFromTab( |
23 content::BrowserContext* context, | 23 content::BrowserContext* context, |
24 content::WebContents* source, | 24 content::WebContents* source, |
25 const content::OpenURLParams& params) override; | 25 const content::OpenURLParams& params) override; |
26 virtual void AddNewContents(content::BrowserContext* context, | 26 void AddNewContents(content::BrowserContext* context, |
27 content::WebContents* new_contents, | 27 content::WebContents* new_contents, |
28 WindowOpenDisposition disposition, | 28 WindowOpenDisposition disposition, |
29 const gfx::Rect& initial_pos, | 29 const gfx::Rect& initial_pos, |
30 bool user_gesture, | 30 bool user_gesture, |
31 bool* was_blocked) override; | 31 bool* was_blocked) override; |
32 virtual content::ColorChooser* ShowColorChooser( | 32 content::ColorChooser* ShowColorChooser(content::WebContents* web_contents, |
33 content::WebContents* web_contents, | 33 SkColor initial_color) override; |
34 SkColor initial_color) override; | 34 void RunFileChooser(content::WebContents* tab, |
35 virtual void RunFileChooser( | 35 const content::FileChooserParams& params) override; |
36 content::WebContents* tab, | 36 void RequestMediaAccessPermission( |
37 const content::FileChooserParams& params) override; | |
38 virtual void RequestMediaAccessPermission( | |
39 content::WebContents* web_contents, | 37 content::WebContents* web_contents, |
40 const content::MediaStreamRequest& request, | 38 const content::MediaStreamRequest& request, |
41 const content::MediaResponseCallback& callback, | 39 const content::MediaResponseCallback& callback, |
42 const Extension* extension) override; | 40 const Extension* extension) override; |
43 virtual bool CheckMediaAccessPermission(content::WebContents* web_contents, | 41 bool CheckMediaAccessPermission(content::WebContents* web_contents, |
44 const GURL& security_origin, | 42 const GURL& security_origin, |
45 content::MediaStreamType type, | 43 content::MediaStreamType type, |
46 const Extension* extension) override; | 44 const Extension* extension) override; |
47 virtual int PreferredIconSize() override; | 45 int PreferredIconSize() override; |
48 virtual void SetWebContentsBlocked(content::WebContents* web_contents, | 46 void SetWebContentsBlocked(content::WebContents* web_contents, |
49 bool blocked) override; | 47 bool blocked) override; |
50 virtual bool IsWebContentsVisible( | 48 bool IsWebContentsVisible(content::WebContents* web_contents) override; |
51 content::WebContents* web_contents) override; | 49 void SetTerminatingCallback(const base::Closure& callback) override; |
52 virtual void SetTerminatingCallback(const base::Closure& callback) override; | |
53 | 50 |
54 private: | 51 private: |
55 DISALLOW_COPY_AND_ASSIGN(ShellAppDelegate); | 52 DISALLOW_COPY_AND_ASSIGN(ShellAppDelegate); |
56 }; | 53 }; |
57 | 54 |
58 } // namespace extensions | 55 } // namespace extensions |
59 | 56 |
60 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ | 57 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_APP_DELEGATE_H_ |
OLD | NEW |