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

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

Issue 11377045: Removing cruft. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Next (and final?) round of "fix via trybot" Created 8 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) 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 // Only consider keeping non-app URLs in an app process if this window 968 // Only consider keeping non-app URLs in an app process if this window
969 // has an opener (in which case it might be an OAuth popup that tries to 969 // has an opener (in which case it might be an OAuth popup that tries to
970 // script an iframe within the app). 970 // script an iframe within the app).
971 bool should_consider_workaround = !!frame->opener(); 971 bool should_consider_workaround = !!frame->opener();
972 972
973 return extensions::CrossesExtensionProcessBoundary( 973 return extensions::CrossesExtensionProcessBoundary(
974 extensions, ExtensionURLInfo(old_url), ExtensionURLInfo(new_url), 974 extensions, ExtensionURLInfo(old_url), ExtensionURLInfo(new_url),
975 should_consider_workaround); 975 should_consider_workaround);
976 } 976 }
977 977
978 void ChromeContentRendererClient::SetSpellcheck(SpellCheck* spellcheck) {
979 RenderThread* thread = RenderThread::Get();
980 if (spellcheck_.get() && thread)
981 thread->RemoveObserver(spellcheck_.get());
982 spellcheck_.reset(spellcheck);
983 SpellCheckReplacer replacer(spellcheck_.get());
984 content::RenderView::ForEach(&replacer);
985 if (thread)
986 thread->AddObserver(spellcheck_.get());
987 }
988
978 void ChromeContentRendererClient::OnPurgeMemory() { 989 void ChromeContentRendererClient::OnPurgeMemory() {
979 DVLOG(1) << "Resetting spellcheck in renderer client"; 990 DVLOG(1) << "Resetting spellcheck in renderer client";
980 RenderThread* thread = RenderThread::Get(); 991 SetSpellcheck(new SpellCheck());
981 if (spellcheck_.get())
982 thread->RemoveObserver(spellcheck_.get());
983 spellcheck_.reset(new SpellCheck());
984 SpellCheckReplacer replacer(spellcheck_.get());
985 content::RenderView::ForEach(&replacer);
986 thread->AddObserver(spellcheck_.get());
987 } 992 }
988 993
989 bool ChromeContentRendererClient::IsAdblockInstalled() { 994 bool ChromeContentRendererClient::IsAdblockInstalled() {
990 return extension_dispatcher_->extensions()->Contains( 995 return extension_dispatcher_->extensions()->Contains(
991 "gighmmpiobklfepjocnamgkkbiglidom"); 996 "gighmmpiobklfepjocnamgkkbiglidom");
992 } 997 }
993 998
994 bool ChromeContentRendererClient::IsAdblockPlusInstalled() { 999 bool ChromeContentRendererClient::IsAdblockPlusInstalled() {
995 return extension_dispatcher_->extensions()->Contains( 1000 return extension_dispatcher_->extensions()->Contains(
996 "cfhdojbkjhnklbpkdaibdccddilifddb"); 1001 "cfhdojbkjhnklbpkdaibdccddilifddb");
(...skipping 10 matching lines...) Expand all
1007 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 1012 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
1008 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 1013 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
1009 } 1014 }
1010 1015
1011 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 1016 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
1012 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 1017 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
1013 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 1018 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
1014 } 1019 }
1015 1020
1016 } // namespace chrome 1021 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_content_renderer_client.h ('k') | chrome/renderer/spellchecker/cocoa_spelling_engine_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698