| OLD | NEW |
| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 template_html, &error_strings, "t"); | 583 template_html, &error_strings, "t"); |
| 584 } | 584 } |
| 585 } | 585 } |
| 586 | 586 |
| 587 if (error_description) { | 587 if (error_description) { |
| 588 if (!extension && !is_repost) | 588 if (!extension && !is_repost) |
| 589 *error_description = LocalizedError::GetErrorDetails(error); | 589 *error_description = LocalizedError::GetErrorDetails(error); |
| 590 } | 590 } |
| 591 } | 591 } |
| 592 | 592 |
| 593 bool ChromeContentRendererClient::RunIdleHandlerWhenWidgetsHidden() { | |
| 594 return !extension_dispatcher_->is_extension_process(); | |
| 595 } | |
| 596 | |
| 597 bool ChromeContentRendererClient::AllowPopup(const GURL& creator) { | 593 bool ChromeContentRendererClient::AllowPopup(const GURL& creator) { |
| 598 ChromeV8Context* current_context = | 594 ChromeV8Context* current_context = |
| 599 extension_dispatcher_->v8_context_set().GetCurrent(); | 595 extension_dispatcher_->v8_context_set().GetCurrent(); |
| 600 return current_context && !current_context->extension_id().empty(); | 596 return current_context && !current_context->extension_id().empty(); |
| 601 } | 597 } |
| 602 | 598 |
| 603 bool ChromeContentRendererClient::ShouldFork(WebFrame* frame, | 599 bool ChromeContentRendererClient::ShouldFork(WebFrame* frame, |
| 604 const GURL& url, | 600 const GURL& url, |
| 605 bool is_content_initiated, | 601 bool is_content_initiated, |
| 606 bool is_initial_navigation, | 602 bool is_initial_navigation, |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { | 800 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { |
| 805 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); | 801 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); |
| 806 } | 802 } |
| 807 | 803 |
| 808 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( | 804 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( |
| 809 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 805 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
| 810 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 806 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
| 811 } | 807 } |
| 812 | 808 |
| 813 } // namespace chrome | 809 } // namespace chrome |
| OLD | NEW |