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