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_EXTENSIONS_CHROME_CONTENT_BROWSER_CLIENT_EXTENSIONS_PART_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_CONTENT_BROWSER_CLIENT_EXTENSIONS_PART_
H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_CONTENT_BROWSER_CLIENT_EXTENSIONS_PART_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_CONTENT_BROWSER_CLIENT_EXTENSIONS_PART_
H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "chrome/browser/chrome_content_browser_client_parts.h" | 10 #include "chrome/browser/chrome_content_browser_client_parts.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 static bool ShouldTryToUseExistingProcessHost(Profile* profile, | 36 static bool ShouldTryToUseExistingProcessHost(Profile* profile, |
37 const GURL& url); | 37 const GURL& url); |
38 static bool ShouldSwapBrowsingInstancesForNavigation( | 38 static bool ShouldSwapBrowsingInstancesForNavigation( |
39 content::SiteInstance* site_instance, | 39 content::SiteInstance* site_instance, |
40 const GURL& current_url, | 40 const GURL& current_url, |
41 const GURL& new_url); | 41 const GURL& new_url); |
42 static bool ShouldSwapProcessesForRedirect( | 42 static bool ShouldSwapProcessesForRedirect( |
43 content::ResourceContext* resource_context, | 43 content::ResourceContext* resource_context, |
44 const GURL& current_url, | 44 const GURL& current_url, |
45 const GURL& new_url); | 45 const GURL& new_url); |
46 static std::string GetWorkerProcessTitle(const GURL& url, | |
47 content::ResourceContext* context); | |
48 | 46 |
49 // Similiar to ChromeContentBrowserClient::ShouldAllowOpenURL(), but the | 47 // Similiar to ChromeContentBrowserClient::ShouldAllowOpenURL(), but the |
50 // return value indicates whether to use |result| or not. | 48 // return value indicates whether to use |result| or not. |
51 static bool ShouldAllowOpenURL(content::SiteInstance* site_instance, | 49 static bool ShouldAllowOpenURL(content::SiteInstance* site_instance, |
52 const GURL& from_url, | 50 const GURL& from_url, |
53 const GURL& to_url, | 51 const GURL& to_url, |
54 bool* result); | 52 bool* result); |
55 | 53 |
56 // Helper function to call InfoMap::SetSigninProcess(). | 54 // Helper function to call InfoMap::SetSigninProcess(). |
57 static void SetSigninProcess(content::SiteInstance* site_instance); | 55 static void SetSigninProcess(content::SiteInstance* site_instance); |
58 | 56 |
59 private: | 57 private: |
60 // ChromeContentBrowserClientParts: | 58 // ChromeContentBrowserClientParts: |
61 virtual void RenderProcessWillLaunch( | 59 virtual void RenderProcessWillLaunch( |
62 content::RenderProcessHost* host) OVERRIDE; | 60 content::RenderProcessHost* host) OVERRIDE; |
63 virtual void SiteInstanceGotProcess( | 61 virtual void SiteInstanceGotProcess( |
64 content::SiteInstance* site_instance) OVERRIDE; | 62 content::SiteInstance* site_instance) OVERRIDE; |
65 virtual void SiteInstanceDeleting( | 63 virtual void SiteInstanceDeleting( |
66 content::SiteInstance* site_instance) OVERRIDE; | 64 content::SiteInstance* site_instance) OVERRIDE; |
67 virtual void WorkerProcessCreated(content::SiteInstance* site_instance, | |
68 int worker_process_id) OVERRIDE; | |
69 virtual void WorkerProcessTerminated(content::SiteInstance* site_instance, | |
70 int worker_process_id) OVERRIDE; | |
71 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, | 65 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, |
72 const GURL& url, | 66 const GURL& url, |
73 content::WebPreferences* web_prefs) OVERRIDE; | 67 content::WebPreferences* web_prefs) OVERRIDE; |
74 virtual void BrowserURLHandlerCreated( | 68 virtual void BrowserURLHandlerCreated( |
75 content::BrowserURLHandler* handler) OVERRIDE; | 69 content::BrowserURLHandler* handler) OVERRIDE; |
76 virtual void GetAdditionalAllowedSchemesForFileSystem( | 70 virtual void GetAdditionalAllowedSchemesForFileSystem( |
77 std::vector<std::string>* additional_allowed_schemes) OVERRIDE; | 71 std::vector<std::string>* additional_allowed_schemes) OVERRIDE; |
78 virtual void GetURLRequestAutoMountHandlers( | 72 virtual void GetURLRequestAutoMountHandlers( |
79 std::vector<fileapi::URLRequestAutoMountHandler>* handlers) OVERRIDE; | 73 std::vector<fileapi::URLRequestAutoMountHandler>* handlers) OVERRIDE; |
80 virtual void GetAdditionalFileSystemBackends( | 74 virtual void GetAdditionalFileSystemBackends( |
81 content::BrowserContext* browser_context, | 75 content::BrowserContext* browser_context, |
82 const base::FilePath& storage_partition_path, | 76 const base::FilePath& storage_partition_path, |
83 ScopedVector<fileapi::FileSystemBackend>* additional_backends) OVERRIDE; | 77 ScopedVector<fileapi::FileSystemBackend>* additional_backends) OVERRIDE; |
84 virtual void AppendExtraRendererCommandLineSwitches( | 78 virtual void AppendExtraRendererCommandLineSwitches( |
85 base::CommandLine* command_line, | 79 base::CommandLine* command_line, |
86 content::RenderProcessHost* process, | 80 content::RenderProcessHost* process, |
87 Profile* profile) OVERRIDE; | 81 Profile* profile) OVERRIDE; |
88 | 82 |
89 scoped_ptr<BrowserPermissionsPolicyDelegate> permissions_policy_delegate_; | 83 scoped_ptr<BrowserPermissionsPolicyDelegate> permissions_policy_delegate_; |
90 | 84 |
91 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientExtensionsPart); | 85 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientExtensionsPart); |
92 }; | 86 }; |
93 | 87 |
94 } // namespace extensions | 88 } // namespace extensions |
95 | 89 |
96 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_CONTENT_BROWSER_CLIENT_EXTENSIONS_PA
RT_H_ | 90 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_CONTENT_BROWSER_CLIENT_EXTENSIONS_PA
RT_H_ |
97 | 91 |
OLD | NEW |