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 #include "extensions/shell/browser/shell_nacl_browser_delegate.h" | 5 #include "extensions/shell/browser/shell_nacl_browser_delegate.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/strings/string_split.h" | 11 #include "base/strings/string_split.h" |
12 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
13 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
15 #include "content/public/browser/render_frame_host.h" | 15 #include "content/public/browser/render_frame_host.h" |
16 #include "content/public/browser/site_instance.h" | 16 #include "content/public/browser/site_instance.h" |
17 #include "extensions/browser/extension_system.h" | 17 #include "extensions/browser/extension_system.h" |
18 #include "extensions/browser/info_map.h" | 18 #include "extensions/browser/info_map.h" |
19 #include "extensions/browser/process_manager.h" | 19 #include "extensions/browser/process_manager.h" |
20 #include "extensions/common/constants.h" | 20 #include "extensions/common/constants.h" |
21 #include "extensions/common/extension.h" | 21 #include "extensions/common/extension.h" |
22 #include "extensions/common/url_pattern.h" | 22 #include "extensions/common/url_pattern.h" |
23 #include "extensions/shell/common/version.h" // Generated file. | |
23 #include "ppapi/c/private/ppb_nacl_private.h" | 24 #include "ppapi/c/private/ppb_nacl_private.h" |
24 #include "url/gurl.h" | 25 #include "url/gurl.h" |
25 | 26 |
26 using content::BrowserContext; | 27 using content::BrowserContext; |
27 using content::BrowserThread; | 28 using content::BrowserThread; |
28 using content::BrowserPpapiHost; | 29 using content::BrowserPpapiHost; |
29 | 30 |
30 namespace extensions { | 31 namespace extensions { |
31 namespace { | 32 namespace { |
32 | 33 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 bool ShellNaClBrowserDelegate::GetUserDirectory(base::FilePath* user_dir) { | 103 bool ShellNaClBrowserDelegate::GetUserDirectory(base::FilePath* user_dir) { |
103 base::FilePath path = browser_context_->GetPath(); | 104 base::FilePath path = browser_context_->GetPath(); |
104 if (!path.empty()) { | 105 if (!path.empty()) { |
105 *user_dir = path; | 106 *user_dir = path; |
106 return true; | 107 return true; |
107 } | 108 } |
108 return false; | 109 return false; |
109 } | 110 } |
110 | 111 |
111 std::string ShellNaClBrowserDelegate::GetVersionString() const { | 112 std::string ShellNaClBrowserDelegate::GetVersionString() const { |
112 // Used to trigger update of the validation caches. | 113 // A version changes triggers an update of the NaCl validation caches. |
Daniel Erat
2014/08/19 18:25:14
nit: s/changes/change/
James Cook
2014/08/19 18:27:44
Done.
| |
113 // TODO(jamescook): Generate a real version number and use it both here and | 114 // Example version: "39.0.2129.0 (290550)". |
114 // in our user agent. http://crbug.com/402612 | 115 return PRODUCT_VERSION " (" LAST_CHANGE ")"; |
115 return "1.2.3.4"; | |
116 } | 116 } |
117 | 117 |
118 ppapi::host::HostFactory* ShellNaClBrowserDelegate::CreatePpapiHostFactory( | 118 ppapi::host::HostFactory* ShellNaClBrowserDelegate::CreatePpapiHostFactory( |
119 content::BrowserPpapiHost* ppapi_host) { | 119 content::BrowserPpapiHost* ppapi_host) { |
120 return NULL; | 120 return NULL; |
121 } | 121 } |
122 | 122 |
123 void ShellNaClBrowserDelegate::SetDebugPatterns(std::string debug_patterns) { | 123 void ShellNaClBrowserDelegate::SetDebugPatterns(std::string debug_patterns) { |
124 // No debugger support. Developers should use Chrome for debugging. | 124 // No debugger support. Developers should use Chrome for debugging. |
125 } | 125 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 return base::Bind(&OnKeepalive); | 180 return base::Bind(&OnKeepalive); |
181 } | 181 } |
182 | 182 |
183 bool ShellNaClBrowserDelegate::IsNonSfiModeAllowed( | 183 bool ShellNaClBrowserDelegate::IsNonSfiModeAllowed( |
184 const base::FilePath& profile_directory, | 184 const base::FilePath& profile_directory, |
185 const GURL& manifest_url) { | 185 const GURL& manifest_url) { |
186 return false; | 186 return false; |
187 } | 187 } |
188 | 188 |
189 } // namespace extensions | 189 } // namespace extensions |
OLD | NEW |