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

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

Issue 8574012: Schedule idle handler based on CPU usage. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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/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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698