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" |
| 11 #include "content/public/common/socket_permission_request.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 class ResourceContext; | 14 class ResourceContext; |
14 } | 15 } |
15 | 16 |
16 namespace extensions { | 17 namespace extensions { |
17 | 18 |
18 class BrowserPermissionsPolicyDelegate; | 19 class BrowserPermissionsPolicyDelegate; |
19 | 20 |
20 // Implements the extensions portion of ChromeContentBrowserClient. | 21 // Implements the extensions portion of ChromeContentBrowserClient. |
(...skipping 26 matching lines...) Expand all Loading... |
47 // Similiar to ChromeContentBrowserClient::ShouldAllowOpenURL(), but the | 48 // Similiar to ChromeContentBrowserClient::ShouldAllowOpenURL(), but the |
48 // return value indicates whether to use |result| or not. | 49 // return value indicates whether to use |result| or not. |
49 static bool ShouldAllowOpenURL(content::SiteInstance* site_instance, | 50 static bool ShouldAllowOpenURL(content::SiteInstance* site_instance, |
50 const GURL& from_url, | 51 const GURL& from_url, |
51 const GURL& to_url, | 52 const GURL& to_url, |
52 bool* result); | 53 bool* result); |
53 | 54 |
54 // Helper function to call InfoMap::SetSigninProcess(). | 55 // Helper function to call InfoMap::SetSigninProcess(). |
55 static void SetSigninProcess(content::SiteInstance* site_instance); | 56 static void SetSigninProcess(content::SiteInstance* site_instance); |
56 | 57 |
| 58 static bool IsPluginAllowedToCallRequestOSFileHandle( |
| 59 content::BrowserContext* browser_context, |
| 60 const GURL& url, |
| 61 const std::set<std::string>& allowed_file_handle_origins); |
| 62 |
| 63 static bool AllowPepperSocketAPI( |
| 64 content::BrowserContext* browser_context, |
| 65 const GURL& url, |
| 66 bool private_api, |
| 67 const content::SocketPermissionRequest* params, |
| 68 const std::set<std::string>& whitelist); |
| 69 |
| 70 static bool IsPluginAllowedToUseDevChannelAPIs( |
| 71 content::BrowserContext* browser_context, |
| 72 const GURL& url, |
| 73 const std::set<std::string>& allowed_dev_channel_origins); |
| 74 |
57 private: | 75 private: |
58 // ChromeContentBrowserClientParts: | 76 // ChromeContentBrowserClientParts: |
59 virtual void RenderProcessWillLaunch( | 77 virtual void RenderProcessWillLaunch( |
60 content::RenderProcessHost* host) OVERRIDE; | 78 content::RenderProcessHost* host) OVERRIDE; |
61 virtual void SiteInstanceGotProcess( | 79 virtual void SiteInstanceGotProcess( |
62 content::SiteInstance* site_instance) OVERRIDE; | 80 content::SiteInstance* site_instance) OVERRIDE; |
63 virtual void SiteInstanceDeleting( | 81 virtual void SiteInstanceDeleting( |
64 content::SiteInstance* site_instance) OVERRIDE; | 82 content::SiteInstance* site_instance) OVERRIDE; |
65 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, | 83 virtual void OverrideWebkitPrefs(content::RenderViewHost* rvh, |
66 const GURL& url, | 84 const GURL& url, |
(...skipping 15 matching lines...) Expand all Loading... |
82 | 100 |
83 scoped_ptr<BrowserPermissionsPolicyDelegate> permissions_policy_delegate_; | 101 scoped_ptr<BrowserPermissionsPolicyDelegate> permissions_policy_delegate_; |
84 | 102 |
85 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientExtensionsPart); | 103 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientExtensionsPart); |
86 }; | 104 }; |
87 | 105 |
88 } // namespace extensions | 106 } // namespace extensions |
89 | 107 |
90 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_CONTENT_BROWSER_CLIENT_EXTENSIONS_PA
RT_H_ | 108 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_CONTENT_BROWSER_CLIENT_EXTENSIONS_PA
RT_H_ |
91 | 109 |
OLD | NEW |