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

Side by Side Diff: extensions/shell/browser/shell_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, 6 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 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 EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ 6 #define EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "content/public/browser/content_browser_client.h" 9 #include "content/public/browser/content_browser_client.h"
10 #include "gin/v8_initializer.h"
10 11
11 class GURL; 12 class GURL;
12 13
13 namespace base { 14 namespace base {
14 class CommandLine; 15 class CommandLine;
15 } 16 }
16 17
17 namespace content { 18 namespace content {
18 class BrowserContext; 19 class BrowserContext;
19 } 20 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 content::SpeechRecognitionManagerDelegate* 56 content::SpeechRecognitionManagerDelegate*
56 CreateSpeechRecognitionManagerDelegate() override; 57 CreateSpeechRecognitionManagerDelegate() override;
57 content::BrowserPpapiHost* GetExternalBrowserPpapiHost( 58 content::BrowserPpapiHost* GetExternalBrowserPpapiHost(
58 int plugin_process_id) override; 59 int plugin_process_id) override;
59 void GetAdditionalAllowedSchemesForFileSystem( 60 void GetAdditionalAllowedSchemesForFileSystem(
60 std::vector<std::string>* additional_schemes) override; 61 std::vector<std::string>* additional_schemes) override;
61 #if defined(OS_POSIX) && !defined(OS_MACOSX) 62 #if defined(OS_POSIX) && !defined(OS_MACOSX)
62 void GetAdditionalMappedFilesForChildProcess( 63 void GetAdditionalMappedFilesForChildProcess(
63 const base::CommandLine& command_line, 64 const base::CommandLine& command_line,
64 int child_process_id, 65 int child_process_id,
65 content::FileDescriptorInfo* mappings) override; 66 content::FileDescriptorInfo* mappings
67 #if defined(OS_ANDROID)
68 , std::map<int, base::MemoryMappedFile::Region>* regions
69 #endif
70 ) override;
66 #endif 71 #endif
67 72
68 content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; 73 content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override;
69 74
70 protected: 75 protected:
71 // Subclasses may wish to provide their own ShellBrowserMainParts. 76 // Subclasses may wish to provide their own ShellBrowserMainParts.
72 virtual ShellBrowserMainParts* CreateShellBrowserMainParts( 77 virtual ShellBrowserMainParts* CreateShellBrowserMainParts(
73 const content::MainFunctionParams& parameters, 78 const content::MainFunctionParams& parameters,
74 ShellBrowserMainDelegate* browser_main_delegate); 79 ShellBrowserMainDelegate* browser_main_delegate);
75 80
76 private: 81 private:
77 // Appends command line switches for a renderer process. 82 // Appends command line switches for a renderer process.
78 void AppendRendererSwitches(base::CommandLine* command_line); 83 void AppendRendererSwitches(base::CommandLine* command_line);
79 84
80 // Returns the extension or app associated with |site_instance| or NULL. 85 // Returns the extension or app associated with |site_instance| or NULL.
81 const Extension* GetExtension(content::SiteInstance* site_instance); 86 const Extension* GetExtension(content::SiteInstance* site_instance);
82 87
83 #if defined(OS_POSIX) && !defined(OS_MACOSX) 88 #if defined(OS_POSIX) && !defined(OS_MACOSX)
84 base::ScopedFD v8_natives_fd_; 89 gin::V8Initializer::V8Files v8_files_;
85 base::ScopedFD v8_snapshot_fd_;
86 #endif 90 #endif
87 91
88 // Owned by content::BrowserMainLoop. 92 // Owned by content::BrowserMainLoop.
89 ShellBrowserMainParts* browser_main_parts_; 93 ShellBrowserMainParts* browser_main_parts_;
90 94
91 // Owned by ShellBrowserMainParts. 95 // Owned by ShellBrowserMainParts.
92 ShellBrowserMainDelegate* browser_main_delegate_; 96 ShellBrowserMainDelegate* browser_main_delegate_;
93 97
94 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient); 98 DISALLOW_COPY_AND_ASSIGN(ShellContentBrowserClient);
95 }; 99 };
96 100
97 } // namespace extensions 101 } // namespace extensions
98 102
99 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_ 103 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698