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 CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ |
6 #define CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ | 6 #define CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ |
7 | 7 |
| 8 #include <set> |
| 9 #include <string> |
| 10 |
8 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
9 #include "components/nacl/browser/nacl_browser_delegate.h" | 12 #include "components/nacl/browser/nacl_browser_delegate.h" |
10 #include "extensions/common/url_pattern.h" | 13 #include "extensions/common/url_pattern.h" |
11 | 14 |
| 15 namespace extensions { |
| 16 class InfoMap; |
| 17 } |
| 18 |
12 class ProfileManager; | 19 class ProfileManager; |
13 | 20 |
14 class NaClBrowserDelegateImpl : public NaClBrowserDelegate { | 21 class NaClBrowserDelegateImpl : public NaClBrowserDelegate { |
15 public: | 22 public: |
16 explicit NaClBrowserDelegateImpl(ProfileManager* profile_manager); | 23 explicit NaClBrowserDelegateImpl(ProfileManager* profile_manager); |
17 virtual ~NaClBrowserDelegateImpl(); | 24 virtual ~NaClBrowserDelegateImpl(); |
18 | 25 |
19 virtual void ShowMissingArchInfobar(int render_process_id, | 26 virtual void ShowMissingArchInfobar(int render_process_id, |
20 int render_view_id) OVERRIDE; | 27 int render_view_id) OVERRIDE; |
21 virtual bool DialogsAreSuppressed() OVERRIDE; | 28 virtual bool DialogsAreSuppressed() OVERRIDE; |
22 virtual bool GetCacheDirectory(base::FilePath* cache_dir) OVERRIDE; | 29 virtual bool GetCacheDirectory(base::FilePath* cache_dir) OVERRIDE; |
23 virtual bool GetPluginDirectory(base::FilePath* plugin_dir) OVERRIDE; | 30 virtual bool GetPluginDirectory(base::FilePath* plugin_dir) OVERRIDE; |
24 virtual bool GetPnaclDirectory(base::FilePath* pnacl_dir) OVERRIDE; | 31 virtual bool GetPnaclDirectory(base::FilePath* pnacl_dir) OVERRIDE; |
25 virtual bool GetUserDirectory(base::FilePath* user_dir) OVERRIDE; | 32 virtual bool GetUserDirectory(base::FilePath* user_dir) OVERRIDE; |
26 virtual std::string GetVersionString() const OVERRIDE; | 33 virtual std::string GetVersionString() const OVERRIDE; |
27 virtual ppapi::host::HostFactory* CreatePpapiHostFactory( | 34 virtual ppapi::host::HostFactory* CreatePpapiHostFactory( |
28 content::BrowserPpapiHost* ppapi_host) OVERRIDE; | 35 content::BrowserPpapiHost* ppapi_host) OVERRIDE; |
29 virtual bool MapUrlToLocalFilePath(const GURL& url, | 36 virtual bool MapUrlToLocalFilePath(const GURL& url, |
30 bool is_blocking, | 37 bool is_blocking, |
31 const base::FilePath& profile_directory, | 38 const base::FilePath& profile_directory, |
32 base::FilePath* file_path) OVERRIDE; | 39 base::FilePath* file_path) OVERRIDE; |
33 virtual void SetDebugPatterns(std::string debug_patterns) OVERRIDE; | 40 virtual void SetDebugPatterns(std::string debug_patterns) OVERRIDE; |
34 virtual bool URLMatchesDebugPatterns(const GURL& manifest_url) OVERRIDE; | 41 virtual bool URLMatchesDebugPatterns(const GURL& manifest_url) OVERRIDE; |
35 virtual content::BrowserPpapiHost::OnKeepaliveCallback | 42 virtual content::BrowserPpapiHost::OnKeepaliveCallback |
36 GetOnKeepaliveCallback() OVERRIDE; | 43 GetOnKeepaliveCallback() OVERRIDE; |
| 44 virtual bool IsNonSfiModeAllowed(const base::FilePath& profile_directory, |
| 45 const GURL& manifest_url) OVERRIDE; |
37 | 46 |
38 private: | 47 private: |
| 48 scoped_refptr<extensions::InfoMap> GetExtensionInfoMap( |
| 49 const base::FilePath& profile_directory); |
39 ProfileManager* profile_manager_; | 50 ProfileManager* profile_manager_; |
40 std::vector<URLPattern> debug_patterns_; | 51 std::vector<URLPattern> debug_patterns_; |
41 bool inverse_debug_patterns_; | 52 bool inverse_debug_patterns_; |
| 53 std::set<std::string> allowed_nonsfi_origins_; |
42 DISALLOW_COPY_AND_ASSIGN(NaClBrowserDelegateImpl); | 54 DISALLOW_COPY_AND_ASSIGN(NaClBrowserDelegateImpl); |
43 }; | 55 }; |
44 | 56 |
45 | 57 |
46 #endif // CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ | 58 #endif // CHROME_BROWSER_NACL_HOST_NACL_BROWSER_DELEGATE_IMPL_H_ |
OLD | NEW |