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

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

Issue 468033002: Remove worker process related codes from ContentBrowserClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 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 <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 1104
1105 void ChromeContentBrowserClient::SiteInstanceDeleting( 1105 void ChromeContentBrowserClient::SiteInstanceDeleting(
1106 SiteInstance* site_instance) { 1106 SiteInstance* site_instance) {
1107 if (!site_instance->HasProcess()) 1107 if (!site_instance->HasProcess())
1108 return; 1108 return;
1109 1109
1110 for (size_t i = 0; i < extra_parts_.size(); ++i) 1110 for (size_t i = 0; i < extra_parts_.size(); ++i)
1111 extra_parts_[i]->SiteInstanceDeleting(site_instance); 1111 extra_parts_[i]->SiteInstanceDeleting(site_instance);
1112 } 1112 }
1113 1113
1114 void ChromeContentBrowserClient::WorkerProcessCreated(
1115 SiteInstance* site_instance,
1116 int worker_process_id) {
1117 for (size_t i = 0; i < extra_parts_.size(); ++i)
1118 extra_parts_[i]->WorkerProcessCreated(site_instance, worker_process_id);
1119 }
1120
1121 void ChromeContentBrowserClient::WorkerProcessTerminated(
1122 SiteInstance* site_instance,
1123 int worker_process_id) {
1124 for (size_t i = 0; i < extra_parts_.size(); ++i)
1125 extra_parts_[i]->WorkerProcessTerminated(site_instance, worker_process_id);
1126 }
1127
1128 bool ChromeContentBrowserClient::ShouldSwapBrowsingInstancesForNavigation( 1114 bool ChromeContentBrowserClient::ShouldSwapBrowsingInstancesForNavigation(
1129 SiteInstance* site_instance, 1115 SiteInstance* site_instance,
1130 const GURL& current_url, 1116 const GURL& current_url,
1131 const GURL& new_url) { 1117 const GURL& new_url) {
1132 #if defined(ENABLE_EXTENSIONS) 1118 #if defined(ENABLE_EXTENSIONS)
1133 return ChromeContentBrowserClientExtensionsPart:: 1119 return ChromeContentBrowserClientExtensionsPart::
1134 ShouldSwapBrowsingInstancesForNavigation( 1120 ShouldSwapBrowsingInstancesForNavigation(
1135 site_instance, current_url, new_url); 1121 site_instance, current_url, new_url);
1136 #else 1122 #else
1137 return false; 1123 return false;
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
2079 FROM_HERE, 2065 FROM_HERE,
2080 base::Bind(&HandleSingleTabModeBlockOnUIThread, 2066 base::Bind(&HandleSingleTabModeBlockOnUIThread,
2081 blocked_params)); 2067 blocked_params));
2082 return false; 2068 return false;
2083 } 2069 }
2084 #endif 2070 #endif
2085 2071
2086 return true; 2072 return true;
2087 } 2073 }
2088 2074
2089 std::string ChromeContentBrowserClient::GetWorkerProcessTitle(
2090 const GURL& url, content::ResourceContext* context) {
2091 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
2092 #if defined(ENABLE_EXTENSIONS)
2093 return ChromeContentBrowserClientExtensionsPart::GetWorkerProcessTitle(
2094 url, context);
2095 #else
2096 return std::string();
2097 #endif
2098 }
2099
2100 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() { 2075 void ChromeContentBrowserClient::ResourceDispatcherHostCreated() {
2101 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 2076 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
2102 prerender_tracker_ = g_browser_process->prerender_tracker(); 2077 prerender_tracker_ = g_browser_process->prerender_tracker();
2103 return g_browser_process->ResourceDispatcherHostCreated(); 2078 return g_browser_process->ResourceDispatcherHostCreated();
2104 } 2079 }
2105 2080
2106 // TODO(tommi): Rename from Get to Create. 2081 // TODO(tommi): Rename from Get to Create.
2107 content::SpeechRecognitionManagerDelegate* 2082 content::SpeechRecognitionManagerDelegate*
2108 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() { 2083 ChromeContentBrowserClient::GetSpeechRecognitionManagerDelegate() {
2109 return new speech::ChromeSpeechRecognitionManagerDelegate(); 2084 return new speech::ChromeSpeechRecognitionManagerDelegate();
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 switches::kDisableWebRtcEncryption, 2614 switches::kDisableWebRtcEncryption,
2640 }; 2615 };
2641 to_command_line->CopySwitchesFrom(from_command_line, 2616 to_command_line->CopySwitchesFrom(from_command_line,
2642 kWebRtcDevSwitchNames, 2617 kWebRtcDevSwitchNames,
2643 arraysize(kWebRtcDevSwitchNames)); 2618 arraysize(kWebRtcDevSwitchNames));
2644 } 2619 }
2645 } 2620 }
2646 #endif // defined(ENABLE_WEBRTC) 2621 #endif // defined(ENABLE_WEBRTC)
2647 2622
2648 } // namespace chrome 2623 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/chrome_content_browser_client_parts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698