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

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

Issue 2000063005: [WIP] Speculatively launch Service Workers on mouse/touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (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 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 return chrome::CreateWebContentsViewDelegate(web_contents); 933 return chrome::CreateWebContentsViewDelegate(web_contents);
934 } 934 }
935 935
936 void ChromeContentBrowserClient::RenderProcessWillLaunch( 936 void ChromeContentBrowserClient::RenderProcessWillLaunch(
937 content::RenderProcessHost* host) { 937 content::RenderProcessHost* host) {
938 int id = host->GetID(); 938 int id = host->GetID();
939 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); 939 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
940 net::URLRequestContextGetter* context = 940 net::URLRequestContextGetter* context =
941 host->GetStoragePartition()->GetURLRequestContext(); 941 host->GetStoragePartition()->GetURLRequestContext();
942 942
943 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); 943 host->AddFilter(new ChromeRenderMessageFilter(
944 id, profile, host->GetStoragePartition()->GetServiceWorkerContext()));
944 #if defined(ENABLE_EXTENSIONS) 945 #if defined(ENABLE_EXTENSIONS)
945 host->AddFilter(new cast::CastTransportHostFilter); 946 host->AddFilter(new cast::CastTransportHostFilter);
946 #endif 947 #endif
947 #if defined(ENABLE_PRINTING) 948 #if defined(ENABLE_PRINTING)
948 host->AddFilter(new printing::PrintingMessageFilter(id, profile)); 949 host->AddFilter(new printing::PrintingMessageFilter(id, profile));
949 #endif 950 #endif
950 host->AddFilter(new SearchProviderInstallStateMessageFilter(id, profile)); 951 host->AddFilter(new SearchProviderInstallStateMessageFilter(id, profile));
951 #if defined(ENABLE_SPELLCHECK) 952 #if defined(ENABLE_SPELLCHECK)
952 host->AddFilter(new SpellCheckMessageFilter(id)); 953 host->AddFilter(new SpellCheckMessageFilter(id));
953 #endif 954 #endif
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 if (channel <= kMaxDisableEncryptionChannel) { 2961 if (channel <= kMaxDisableEncryptionChannel) {
2961 static const char* const kWebRtcDevSwitchNames[] = { 2962 static const char* const kWebRtcDevSwitchNames[] = {
2962 switches::kDisableWebRtcEncryption, 2963 switches::kDisableWebRtcEncryption,
2963 }; 2964 };
2964 to_command_line->CopySwitchesFrom(from_command_line, 2965 to_command_line->CopySwitchesFrom(from_command_line,
2965 kWebRtcDevSwitchNames, 2966 kWebRtcDevSwitchNames,
2966 arraysize(kWebRtcDevSwitchNames)); 2967 arraysize(kWebRtcDevSwitchNames));
2967 } 2968 }
2968 } 2969 }
2969 #endif // defined(ENABLE_WEBRTC) 2970 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/renderer_host/chrome_render_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698