Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1018)

Side by Side Diff: chrome/browser/chrome_content_browser_client.h

Issue 1156873002: Load v8 snapshots directly from APK (and store them uncompressed) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8initializer
Patch Set: Pass FDs & Regions through to child process (Still has formatting errors) Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHROME_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_
6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ 6 #define CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "chrome/common/chrome_version_info.h" 17 #include "chrome/common/chrome_version_info.h"
18 #include "content/public/browser/content_browser_client.h" 18 #include "content/public/browser/content_browser_client.h"
19 #include "gin/v8_initializer.h"
19 20
20 class ChromeContentBrowserClientParts; 21 class ChromeContentBrowserClientParts;
21 22
22 namespace base { 23 namespace base {
23 class CommandLine; 24 class CommandLine;
24 } 25 }
25 26
26 namespace content { 27 namespace content {
27 class QuotaPermissionContext; 28 class QuotaPermissionContext;
28 } 29 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 content::BrowserContext* browser_context, 237 content::BrowserContext* browser_context,
237 const GURL& url) override; 238 const GURL& url) override;
238 void OverridePageVisibilityState( 239 void OverridePageVisibilityState(
239 content::RenderFrameHost* render_frame_host, 240 content::RenderFrameHost* render_frame_host,
240 blink::WebPageVisibilityState* visibility_state) override; 241 blink::WebPageVisibilityState* visibility_state) override;
241 242
242 #if defined(OS_POSIX) && !defined(OS_MACOSX) 243 #if defined(OS_POSIX) && !defined(OS_MACOSX)
243 void GetAdditionalMappedFilesForChildProcess( 244 void GetAdditionalMappedFilesForChildProcess(
244 const base::CommandLine& command_line, 245 const base::CommandLine& command_line,
245 int child_process_id, 246 int child_process_id,
246 content::FileDescriptorInfo* mappings) override; 247 content::FileDescriptorInfo* mappings
248 #if defined(OS_ANDROID)
249 , std::map<int, base::MemoryMappedFile::Region>* regions
250 #endif
251 ) override;
247 #endif 252 #endif
248 #if defined(OS_WIN) 253 #if defined(OS_WIN)
249 const wchar_t* GetResourceDllName() override; 254 const wchar_t* GetResourceDllName() override;
250 void PreSpawnRenderer(sandbox::TargetPolicy* policy, bool* success) override; 255 void PreSpawnRenderer(sandbox::TargetPolicy* policy, bool* success) override;
251 #endif 256 #endif
252 void OverrideRenderFrameMojoServices( 257 void OverrideRenderFrameMojoServices(
253 content::ServiceRegistry* registry, 258 content::ServiceRegistry* registry,
254 content::RenderFrameHost* render_frame_host) override; 259 content::RenderFrameHost* render_frame_host) override;
255 void OpenURL(content::BrowserContext* browser_context, 260 void OpenURL(content::BrowserContext* browser_context,
256 const content::OpenURLParams& params, 261 const content::OpenURLParams& params,
(...skipping 27 matching lines...) Expand all
284 bool allow); 289 bool allow);
285 290
286 static void RequestFileSystemPermissionOnUIThread( 291 static void RequestFileSystemPermissionOnUIThread(
287 int render_process_id, 292 int render_process_id,
288 int render_frame_id, 293 int render_frame_id,
289 const GURL& url, 294 const GURL& url,
290 bool allowed_by_default, 295 bool allowed_by_default,
291 const base::Callback<void(bool)>& callback); 296 const base::Callback<void(bool)>& callback);
292 #endif 297 #endif
293 298
299 #if defined(OS_POSIX) && !defined(OS_MACOSX)
300 void LazyPrepV8StartupData();
301 #endif
302
294 #if defined(ENABLE_PLUGINS) 303 #if defined(ENABLE_PLUGINS)
295 // Set of origins that can use TCP/UDP private APIs from NaCl. 304 // Set of origins that can use TCP/UDP private APIs from NaCl.
296 std::set<std::string> allowed_socket_origins_; 305 std::set<std::string> allowed_socket_origins_;
297 // Set of origins that can get a handle for FileIO from NaCl. 306 // Set of origins that can get a handle for FileIO from NaCl.
298 std::set<std::string> allowed_file_handle_origins_; 307 std::set<std::string> allowed_file_handle_origins_;
299 // Set of origins that can use "dev chanel" APIs from NaCl, even on stable 308 // Set of origins that can use "dev chanel" APIs from NaCl, even on stable
300 // versions of Chrome. 309 // versions of Chrome.
301 std::set<std::string> allowed_dev_channel_origins_; 310 std::set<std::string> allowed_dev_channel_origins_;
302 #endif 311 #endif
303 312
304 #if defined(OS_POSIX) && !defined(OS_MACOSX) 313 #if defined(OS_POSIX) && !defined(OS_MACOSX)
305 base::ScopedFD v8_natives_fd_; 314 gin::V8Initializer::V8Files v8_files_;
306 base::ScopedFD v8_snapshot_fd_;
307 #endif // OS_POSIX && !OS_MACOSX 315 #endif // OS_POSIX && !OS_MACOSX
308 316
309 // Vector of additional ChromeContentBrowserClientParts. 317 // Vector of additional ChromeContentBrowserClientParts.
310 // Parts are deleted in the reverse order they are added. 318 // Parts are deleted in the reverse order they are added.
311 std::vector<ChromeContentBrowserClientParts*> extra_parts_; 319 std::vector<ChromeContentBrowserClientParts*> extra_parts_;
312 320
313 base::WeakPtrFactory<ChromeContentBrowserClient> weak_factory_; 321 base::WeakPtrFactory<ChromeContentBrowserClient> weak_factory_;
314 322
315 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient); 323 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClient);
316 }; 324 };
317 325
318 } // namespace chrome 326 } // namespace chrome
319 327
320 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_ 328 #endif // CHROME_BROWSER_CHROME_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698