| OLD | NEW |
| 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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/crash_logging.h" | 10 #include "base/debug/crash_logging.h" |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 #endif | 361 #endif |
| 362 thread->AddObserver(visited_link_slave_.get()); | 362 thread->AddObserver(visited_link_slave_.get()); |
| 363 thread->AddObserver(prerender_dispatcher_.get()); | 363 thread->AddObserver(prerender_dispatcher_.get()); |
| 364 thread->AddObserver(SearchBouncer::GetInstance()); | 364 thread->AddObserver(SearchBouncer::GetInstance()); |
| 365 | 365 |
| 366 #if defined(ENABLE_WEBRTC) | 366 #if defined(ENABLE_WEBRTC) |
| 367 thread->AddFilter(webrtc_logging_message_filter_.get()); | 367 thread->AddFilter(webrtc_logging_message_filter_.get()); |
| 368 #endif | 368 #endif |
| 369 | 369 |
| 370 thread->RegisterExtension(extensions_v8::ExternalExtension::Get()); | 370 thread->RegisterExtension(extensions_v8::ExternalExtension::Get()); |
| 371 thread->RegisterExtension(extensions_v8::LoadTimesExtension::Get()); | |
| 372 | 371 |
| 373 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 372 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 374 if (command_line->HasSwitch(switches::kEnableBenchmarking)) | 373 if (command_line->HasSwitch(switches::kEnableBenchmarking)) |
| 375 thread->RegisterExtension(extensions_v8::BenchmarkingExtension::Get()); | 374 thread->RegisterExtension(extensions_v8::BenchmarkingExtension::Get()); |
| 376 if (command_line->HasSwitch(switches::kEnableNetBenchmarking)) | 375 if (command_line->HasSwitch(switches::kEnableNetBenchmarking)) |
| 377 thread->RegisterExtension(extensions_v8::NetBenchmarkingExtension::Get()); | 376 thread->RegisterExtension(extensions_v8::NetBenchmarkingExtension::Get()); |
| 378 if (command_line->HasSwitch(switches::kInstantProcess)) | 377 if (command_line->HasSwitch(switches::kInstantProcess)) |
| 379 thread->RegisterExtension(extensions_v8::SearchBoxExtension::Get()); | 378 thread->RegisterExtension(extensions_v8::SearchBoxExtension::Get()); |
| 380 | 379 |
| 381 // chrome-search: and chrome-distiller: pages should not be accessible by | 380 // chrome-search: and chrome-distiller: pages should not be accessible by |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 503 |
| 505 // Set up a mojo service to test if this page is a contextual search page. | 504 // Set up a mojo service to test if this page is a contextual search page. |
| 506 new contextual_search::OverlayJsRenderFrameObserver(render_frame); | 505 new contextual_search::OverlayJsRenderFrameObserver(render_frame); |
| 507 | 506 |
| 508 PasswordAutofillAgent* password_autofill_agent = | 507 PasswordAutofillAgent* password_autofill_agent = |
| 509 new PasswordAutofillAgent(render_frame); | 508 new PasswordAutofillAgent(render_frame); |
| 510 PasswordGenerationAgent* password_generation_agent = | 509 PasswordGenerationAgent* password_generation_agent = |
| 511 new PasswordGenerationAgent(render_frame, password_autofill_agent); | 510 new PasswordGenerationAgent(render_frame, password_autofill_agent); |
| 512 new AutofillAgent(render_frame, password_autofill_agent, | 511 new AutofillAgent(render_frame, password_autofill_agent, |
| 513 password_generation_agent); | 512 password_generation_agent); |
| 513 |
| 514 new extensions_v8::LoadTimesExtensionHelper(render_frame); |
| 514 } | 515 } |
| 515 | 516 |
| 516 void ChromeContentRendererClient::RenderViewCreated( | 517 void ChromeContentRendererClient::RenderViewCreated( |
| 517 content::RenderView* render_view) { | 518 content::RenderView* render_view) { |
| 518 #if defined(ENABLE_EXTENSIONS) | 519 #if defined(ENABLE_EXTENSIONS) |
| 519 ChromeExtensionsRendererClient::GetInstance()->RenderViewCreated(render_view); | 520 ChromeExtensionsRendererClient::GetInstance()->RenderViewCreated(render_view); |
| 520 #endif | 521 #endif |
| 521 new PageLoadHistograms(render_view); | 522 new PageLoadHistograms(render_view); |
| 522 #if defined(ENABLE_PRINTING) | 523 #if defined(ENABLE_PRINTING) |
| 523 new printing::PrintWebViewHelper( | 524 new printing::PrintWebViewHelper( |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 #if defined(ENABLE_EXTENSIONS) | 1420 #if defined(ENABLE_EXTENSIONS) |
| 1420 return !IsStandaloneExtensionProcess(); | 1421 return !IsStandaloneExtensionProcess(); |
| 1421 #else | 1422 #else |
| 1422 return true; | 1423 return true; |
| 1423 #endif | 1424 #endif |
| 1424 } | 1425 } |
| 1425 | 1426 |
| 1426 base::StringPiece ChromeContentRendererClient::GetOriginTrialPublicKey() { | 1427 base::StringPiece ChromeContentRendererClient::GetOriginTrialPublicKey() { |
| 1427 return origin_trial_key_manager_.GetPublicKey(); | 1428 return origin_trial_key_manager_.GetPublicKey(); |
| 1428 } | 1429 } |
| OLD | NEW |