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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 7885013: Move the ViewHostMsg_ClearPredictorCache out of content into chrome as this functionality is chro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
« no previous file with comments | « chrome/renderer/benchmarking_extension.cc ('k') | content/app/content_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/common/extensions/extension_constants.h" 21 #include "chrome/common/extensions/extension_constants.h"
22 #include "chrome/common/extensions/extension_set.h" 22 #include "chrome/common/extensions/extension_set.h"
23 #include "chrome/common/jstemplate_builder.h" 23 #include "chrome/common/jstemplate_builder.h"
24 #include "chrome/common/render_messages.h" 24 #include "chrome/common/render_messages.h"
25 #include "chrome/common/url_constants.h" 25 #include "chrome/common/url_constants.h"
26 #include "chrome/renderer/autofill/autofill_agent.h" 26 #include "chrome/renderer/autofill/autofill_agent.h"
27 #include "chrome/renderer/autofill/form_manager.h" 27 #include "chrome/renderer/autofill/form_manager.h"
28 #include "chrome/renderer/autofill/password_autofill_manager.h" 28 #include "chrome/renderer/autofill/password_autofill_manager.h"
29 #include "chrome/renderer/automation/automation_renderer_helper.h" 29 #include "chrome/renderer/automation/automation_renderer_helper.h"
30 #include "chrome/renderer/automation/dom_automation_v8_extension.h" 30 #include "chrome/renderer/automation/dom_automation_v8_extension.h"
31 #include "chrome/renderer/benchmarking_extension.h"
31 #include "chrome/renderer/blocked_plugin.h" 32 #include "chrome/renderer/blocked_plugin.h"
32 #include "chrome/renderer/chrome_ppapi_interfaces.h" 33 #include "chrome/renderer/chrome_ppapi_interfaces.h"
33 #include "chrome/renderer/chrome_render_process_observer.h" 34 #include "chrome/renderer/chrome_render_process_observer.h"
34 #include "chrome/renderer/chrome_render_view_observer.h" 35 #include "chrome/renderer/chrome_render_view_observer.h"
35 #include "chrome/renderer/content_settings_observer.h" 36 #include "chrome/renderer/content_settings_observer.h"
36 #include "chrome/renderer/extensions/bindings_utils.h" 37 #include "chrome/renderer/extensions/bindings_utils.h"
37 #include "chrome/renderer/extensions/event_bindings.h" 38 #include "chrome/renderer/extensions/event_bindings.h"
38 #include "chrome/renderer/extensions/extension_dispatcher.h" 39 #include "chrome/renderer/extensions/extension_dispatcher.h"
39 #include "chrome/renderer/extensions/extension_helper.h" 40 #include "chrome/renderer/extensions/extension_helper.h"
40 #include "chrome/renderer/extensions/extension_process_bindings.h" 41 #include "chrome/renderer/extensions/extension_process_bindings.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // search_extension is null if not enabled. 182 // search_extension is null if not enabled.
182 if (search_extension) 183 if (search_extension)
183 thread->RegisterExtension(search_extension); 184 thread->RegisterExtension(search_extension);
184 185
185 if (CommandLine::ForCurrentProcess()->HasSwitch( 186 if (CommandLine::ForCurrentProcess()->HasSwitch(
186 switches::kDomAutomationController)) { 187 switches::kDomAutomationController)) {
187 thread->RegisterExtension(DomAutomationV8Extension::Get()); 188 thread->RegisterExtension(DomAutomationV8Extension::Get());
188 } 189 }
189 190
190 if (CommandLine::ForCurrentProcess()->HasSwitch( 191 if (CommandLine::ForCurrentProcess()->HasSwitch(
192 switches::kEnableBenchmarking))
193 thread->RegisterExtension(extensions_v8::BenchmarkingExtension::Get());
194
195 if (CommandLine::ForCurrentProcess()->HasSwitch(
191 switches::kEnableIPCFuzzing)) { 196 switches::kEnableIPCFuzzing)) {
192 thread->channel()->set_outgoing_message_filter(LoadExternalIPCFuzzer()); 197 thread->channel()->set_outgoing_message_filter(LoadExternalIPCFuzzer());
193 } 198 }
194 // chrome:, chrome-devtools:, and chrome-internal: pages should not be 199 // chrome:, chrome-devtools:, and chrome-internal: pages should not be
195 // accessible by normal content, and should also be unable to script 200 // accessible by normal content, and should also be unable to script
196 // anything but themselves (to help limit the damage that a corrupt 201 // anything but themselves (to help limit the damage that a corrupt
197 // page could cause). 202 // page could cause).
198 WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme)); 203 WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme));
199 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); 204 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme);
200 205
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 if (spellcheck_.get()) 770 if (spellcheck_.get())
766 thread->RemoveObserver(spellcheck_.get()); 771 thread->RemoveObserver(spellcheck_.get());
767 SpellCheck* new_spellcheck = new SpellCheck(); 772 SpellCheck* new_spellcheck = new SpellCheck();
768 if (spellcheck_provider_) 773 if (spellcheck_provider_)
769 spellcheck_provider_->SetSpellCheck(new_spellcheck); 774 spellcheck_provider_->SetSpellCheck(new_spellcheck);
770 spellcheck_.reset(new_spellcheck); 775 spellcheck_.reset(new_spellcheck);
771 thread->AddObserver(new_spellcheck); 776 thread->AddObserver(new_spellcheck);
772 } 777 }
773 778
774 } // namespace chrome 779 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/renderer/benchmarking_extension.cc ('k') | content/app/content_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698