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

Side by Side Diff: chromecast/browser/cast_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 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 CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_
6 #define CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ 6 #define CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "content/public/browser/content_browser_client.h" 14 #include "content/public/browser/content_browser_client.h"
15 #include "gin/v8_initializer.h"
15 16
16 namespace breakpad { 17 namespace breakpad {
17 class CrashHandlerHostLinux; 18 class CrashHandlerHostLinux;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
21 class BrowserMessageFilter; 22 class BrowserMessageFilter;
22 } 23 }
23 24
24 namespace media { 25 namespace media {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 const blink::WebWindowFeatures& features, 94 const blink::WebWindowFeatures& features,
94 bool user_gesture, 95 bool user_gesture,
95 bool opener_suppressed, 96 bool opener_suppressed,
96 content::ResourceContext* context, 97 content::ResourceContext* context,
97 int render_process_id, 98 int render_process_id,
98 int opener_id, 99 int opener_id,
99 bool* no_javascript_access) override; 100 bool* no_javascript_access) override;
100 void GetAdditionalMappedFilesForChildProcess( 101 void GetAdditionalMappedFilesForChildProcess(
101 const base::CommandLine& command_line, 102 const base::CommandLine& command_line,
102 int child_process_id, 103 int child_process_id,
103 content::FileDescriptorInfo* mappings) override; 104 content::FileDescriptorInfo* mappings
105 #if defined(OS_ANDROID)
106 , std::map<int, base::MemoryMappedFile::Region>* regions
107 #endif
108 ) override;
104 #if defined(OS_ANDROID) && defined(VIDEO_HOLE) 109 #if defined(OS_ANDROID) && defined(VIDEO_HOLE)
105 content::ExternalVideoSurfaceContainer* 110 content::ExternalVideoSurfaceContainer*
106 OverrideCreateExternalVideoSurfaceContainer( 111 OverrideCreateExternalVideoSurfaceContainer(
107 content::WebContents* web_contents) override; 112 content::WebContents* web_contents) override;
108 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE) 113 #endif // defined(OS_ANDROID) && defined(VIDEO_HOLE)
109 114
110 private: 115 private:
111 void AddNetworkHintsMessageFilter(int render_process_id, 116 void AddNetworkHintsMessageFilter(int render_process_id,
112 net::URLRequestContext* context); 117 net::URLRequestContext* context);
113 118
114 net::X509Certificate* SelectClientCertificateOnIOThread( 119 net::X509Certificate* SelectClientCertificateOnIOThread(
115 GURL requesting_url, 120 GURL requesting_url,
116 int render_process_id); 121 int render_process_id);
117 122
118 scoped_ptr<::media::AudioManagerFactory> PlatformCreateAudioManagerFactory(); 123 scoped_ptr<::media::AudioManagerFactory> PlatformCreateAudioManagerFactory();
119 124
120 #if !defined(OS_ANDROID) 125 #if !defined(OS_ANDROID)
121 // Returns the crash signal FD corresponding to the current process type. 126 // Returns the crash signal FD corresponding to the current process type.
122 int GetCrashSignalFD(const base::CommandLine& command_line); 127 int GetCrashSignalFD(const base::CommandLine& command_line);
123 128
124 // Creates a CrashHandlerHost instance for the given process type. 129 // Creates a CrashHandlerHost instance for the given process type.
125 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( 130 breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost(
126 const std::string& process_type); 131 const std::string& process_type);
127 132
128 // A static cache to hold crash_handlers for each process_type 133 // A static cache to hold crash_handlers for each process_type
129 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_; 134 std::map<std::string, breakpad::CrashHandlerHostLinux*> crash_handlers_;
130 #endif 135 #endif
131 136
132 base::ScopedFD v8_natives_fd_; 137 gin::V8Initializer::V8Files v8_files_;
133 base::ScopedFD v8_snapshot_fd_;
134 138
135 scoped_ptr<URLRequestContextFactory> url_request_context_factory_; 139 scoped_ptr<URLRequestContextFactory> url_request_context_factory_;
136 140
137 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient); 141 DISALLOW_COPY_AND_ASSIGN(CastContentBrowserClient);
138 }; 142 };
139 143
140 } // namespace shell 144 } // namespace shell
141 } // namespace chromecast 145 } // namespace chromecast
142 146
143 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_ 147 #endif // CHROMECAST_BROWSER_CAST_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698