OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 5 #ifndef APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
6 #define APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 6 #define APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/public/browser/content_browser_client.h" | 9 #include "content/public/browser/content_browser_client.h" |
10 | 10 |
11 class GURL; | 11 class GURL; |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class BrowserContext; | 14 class BrowserContext; |
15 } | 15 } |
16 | 16 |
17 namespace extensions { | 17 namespace extensions { |
18 class Extension; | 18 class Extension; |
19 } | 19 } |
20 | 20 |
21 namespace apps { | 21 namespace apps { |
| 22 class ShellBrowserMainDelegate; |
22 class ShellBrowserMainParts; | 23 class ShellBrowserMainParts; |
23 | 24 |
24 // Content module browser process support for app_shell. | 25 // Content module browser process support for app_shell. |
25 class ShellContentBrowserClient : public content::ContentBrowserClient { | 26 class ShellContentBrowserClient : public content::ContentBrowserClient { |
26 public: | 27 public: |
27 ShellContentBrowserClient(); | 28 explicit ShellContentBrowserClient( |
| 29 ShellBrowserMainDelegate* browser_main_delegate); |
28 virtual ~ShellContentBrowserClient(); | 30 virtual ~ShellContentBrowserClient(); |
29 | 31 |
30 // Returns the single instance. | 32 // Returns the single instance. |
31 static ShellContentBrowserClient* Get(); | 33 static ShellContentBrowserClient* Get(); |
32 | 34 |
33 // Returns the single browser context for app_shell. | 35 // Returns the single browser context for app_shell. |
34 content::BrowserContext* GetBrowserContext(); | 36 content::BrowserContext* GetBrowserContext(); |
35 | 37 |
36 // content::ContentBrowserClient overrides. | 38 // content::ContentBrowserClient overrides. |
37 virtual content::BrowserMainParts* CreateBrowserMainParts( | 39 virtual content::BrowserMainParts* CreateBrowserMainParts( |
(...skipping 19 matching lines...) Expand all Loading... |
57 std::vector<std::string>* additional_schemes) OVERRIDE; | 59 std::vector<std::string>* additional_schemes) OVERRIDE; |
58 | 60 |
59 private: | 61 private: |
60 // Returns the extension or app associated with |site_instance| or NULL. | 62 // Returns the extension or app associated with |site_instance| or NULL. |
61 const extensions::Extension* GetExtension( | 63 const extensions::Extension* GetExtension( |
62 content::SiteInstance* site_instance); | 64 content::SiteInstance* site_instance); |
63 | 65 |
64 // Owned by content::BrowserMainLoop. | 66 // Owned by content::BrowserMainLoop. |
65 ShellBrowserMainParts* browser_main_parts_; | 67 ShellBrowserMainParts* browser_main_parts_; |
66 | 68 |
| 69 ShellBrowserMainDelegate* browser_main_delegate_; // Not owned. |
| 70 |
67 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); | 71 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); |
68 }; | 72 }; |
69 | 73 |
70 } // namespace apps | 74 } // namespace apps |
71 | 75 |
72 #endif // APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ | 76 #endif // APPS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |