| 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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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() { | 593 bool ChromeContentRendererClient::RunIdleHandlerWhenWidgetsHidden() { |
| 594 return !extension_dispatcher_->is_extension_process(); | 594 return !extension_dispatcher_->is_extension_process(); |
| 595 } | 595 } |
| 596 | 596 |
| 597 bool ChromeContentRendererClient::RunIdleHandlerWhenUserIdle() { |
| 598 return !extension_dispatcher_->is_extension_process(); |
| 599 } |
| 600 |
| 597 bool ChromeContentRendererClient::AllowPopup(const GURL& creator) { | 601 bool ChromeContentRendererClient::AllowPopup(const GURL& creator) { |
| 598 ChromeV8Context* current_context = | 602 ChromeV8Context* current_context = |
| 599 extension_dispatcher_->v8_context_set().GetCurrent(); | 603 extension_dispatcher_->v8_context_set().GetCurrent(); |
| 600 return current_context && !current_context->extension_id().empty(); | 604 return current_context && !current_context->extension_id().empty(); |
| 601 } | 605 } |
| 602 | 606 |
| 603 bool ChromeContentRendererClient::ShouldFork(WebFrame* frame, | 607 bool ChromeContentRendererClient::ShouldFork(WebFrame* frame, |
| 604 const GURL& url, | 608 const GURL& url, |
| 605 bool is_content_initiated, | 609 bool is_content_initiated, |
| 606 bool is_initial_navigation, | 610 bool is_initial_navigation, |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { | 808 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { |
| 805 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); | 809 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); |
| 806 } | 810 } |
| 807 | 811 |
| 808 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( | 812 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( |
| 809 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { | 813 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { |
| 810 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 814 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
| 811 } | 815 } |
| 812 | 816 |
| 813 } // namespace chrome | 817 } // namespace chrome |
| OLD | NEW |