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

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

Issue 7015026: Cancel prerenders for pages that call window.print() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missed a data file. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/app/breakpad_mac.h" 8 #include "chrome/app/breakpad_mac.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/character_encoding.h" 10 #include "chrome/browser/character_encoding.h"
11 #include "chrome/browser/chrome_worker_message_filter.h" 11 #include "chrome/browser/chrome_worker_message_filter.h"
12 #include "chrome/browser/content_settings/host_content_settings_map.h" 12 #include "chrome/browser/content_settings/host_content_settings_map.h"
13 #include "chrome/browser/debugger/devtools_handler.h" 13 #include "chrome/browser/debugger/devtools_handler.h"
14 #include "chrome/browser/desktop_notification_handler.h" 14 #include "chrome/browser/desktop_notification_handler.h"
15 #include "chrome/browser/extensions/extension_message_handler.h" 15 #include "chrome/browser/extensions/extension_message_handler.h"
16 #include "chrome/browser/extensions/extension_service.h" 16 #include "chrome/browser/extensions/extension_service.h"
17 #include "chrome/browser/google/google_util.h" 17 #include "chrome/browser/google/google_util.h"
18 #include "chrome/browser/prefs/pref_service.h" 18 #include "chrome/browser/prefs/pref_service.h"
19 #include "chrome/browser/prerender/prerender_message_filter.h"
19 #include "chrome/browser/printing/printing_message_filter.h" 20 #include "chrome/browser/printing/printing_message_filter.h"
20 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
21 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" 22 #include "chrome/browser/renderer_host/chrome_render_message_filter.h"
22 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" 23 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h"
23 #include "chrome/browser/renderer_host/text_input_client_message_filter.h" 24 #include "chrome/browser/renderer_host/text_input_client_message_filter.h"
24 #include "chrome/browser/search_engines/search_provider_install_state_message_fi lter.h" 25 #include "chrome/browser/search_engines/search_provider_install_state_message_fi lter.h"
25 #include "chrome/browser/spellcheck_message_filter.h" 26 #include "chrome/browser/spellcheck_message_filter.h"
26 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" 27 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h"
27 #include "chrome/common/child_process_logging.h" 28 #include "chrome/common/child_process_logging.h"
28 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 70 }
70 } 71 }
71 } 72 }
72 73
73 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated( 74 void ChromeContentBrowserClient::BrowserRenderProcessHostCreated(
74 BrowserRenderProcessHost* host) { 75 BrowserRenderProcessHost* host) {
75 int id = host->id(); 76 int id = host->id();
76 Profile* profile = host->profile(); 77 Profile* profile = host->profile();
77 host->channel()->AddFilter(new ChromeRenderMessageFilter( 78 host->channel()->AddFilter(new ChromeRenderMessageFilter(
78 id, profile, profile->GetRequestContextForRenderProcess(id))); 79 id, profile, profile->GetRequestContextForRenderProcess(id)));
80 host->channel()->AddFilter(new prerender::PrerenderMessageFilter(
cbentzel 2011/05/13 12:00:28 Does ordering of filters matter? I'm guessing it d
dominich 2011/05/13 15:05:33 Done.
81 host, profile->GetPrerenderManager()));
79 host->channel()->AddFilter(new PrintingMessageFilter()); 82 host->channel()->AddFilter(new PrintingMessageFilter());
80 host->channel()->AddFilter( 83 host->channel()->AddFilter(
81 new SearchProviderInstallStateMessageFilter(id, profile)); 84 new SearchProviderInstallStateMessageFilter(id, profile));
82 host->channel()->AddFilter(new SpellCheckMessageFilter(id)); 85 host->channel()->AddFilter(new SpellCheckMessageFilter(id));
83 #if defined(OS_MACOSX) 86 #if defined(OS_MACOSX)
84 host->channel()->AddFilter(new TextInputClientMessageFilter(host->id())); 87 host->channel()->AddFilter(new TextInputClientMessageFilter(host->id()));
85 #endif 88 #endif
86 } 89 }
87 90
88 void ChromeContentBrowserClient::WorkerProcessHostCreated( 91 void ChromeContentBrowserClient::WorkerProcessHostCreated(
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 284 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
282 285
283 if (process_type == switches::kGpuProcess) 286 if (process_type == switches::kGpuProcess)
284 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 287 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket();
285 288
286 return -1; 289 return -1;
287 } 290 }
288 #endif 291 #endif
289 292
290 } // namespace chrome 293 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | chrome/browser/prerender/prerender_message_filter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698