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

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

Issue 11361265: [Spellcheck] Removing cruft. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 // Only consider keeping non-app URLs in an app process if this window 970 // Only consider keeping non-app URLs in an app process if this window
971 // has an opener (in which case it might be an OAuth popup that tries to 971 // has an opener (in which case it might be an OAuth popup that tries to
972 // script an iframe within the app). 972 // script an iframe within the app).
973 bool should_consider_workaround = !!frame->opener(); 973 bool should_consider_workaround = !!frame->opener();
974 974
975 return extensions::CrossesExtensionProcessBoundary( 975 return extensions::CrossesExtensionProcessBoundary(
976 extensions, ExtensionURLInfo(old_url), ExtensionURLInfo(new_url), 976 extensions, ExtensionURLInfo(old_url), ExtensionURLInfo(new_url),
977 should_consider_workaround); 977 should_consider_workaround);
978 } 978 }
979 979
980 void ChromeContentRendererClient::SetSpellcheck(SpellCheck* spellcheck) {
981 RenderThread* thread = RenderThread::Get();
982 if (spellcheck_.get() && thread)
983 thread->RemoveObserver(spellcheck_.get());
984 spellcheck_.reset(spellcheck);
985 SpellCheckReplacer replacer(spellcheck_.get());
986 content::RenderView::ForEach(&replacer);
987 if (thread)
988 thread->AddObserver(spellcheck_.get());
989 }
990
980 void ChromeContentRendererClient::OnPurgeMemory() { 991 void ChromeContentRendererClient::OnPurgeMemory() {
981 DVLOG(1) << "Resetting spellcheck in renderer client"; 992 DVLOG(1) << "Resetting spellcheck in renderer client";
982 RenderThread* thread = RenderThread::Get(); 993 SetSpellcheck(new SpellCheck());
983 if (spellcheck_.get())
984 thread->RemoveObserver(spellcheck_.get());
985 spellcheck_.reset(new SpellCheck());
986 SpellCheckReplacer replacer(spellcheck_.get());
987 content::RenderView::ForEach(&replacer);
988 thread->AddObserver(spellcheck_.get());
989 } 994 }
990 995
991 bool ChromeContentRendererClient::IsAdblockInstalled() { 996 bool ChromeContentRendererClient::IsAdblockInstalled() {
992 return extension_dispatcher_->extensions()->Contains( 997 return extension_dispatcher_->extensions()->Contains(
993 "gighmmpiobklfepjocnamgkkbiglidom"); 998 "gighmmpiobklfepjocnamgkkbiglidom");
994 } 999 }
995 1000
996 bool ChromeContentRendererClient::IsAdblockPlusInstalled() { 1001 bool ChromeContentRendererClient::IsAdblockPlusInstalled() {
997 return extension_dispatcher_->extensions()->Contains( 1002 return extension_dispatcher_->extensions()->Contains(
998 "cfhdojbkjhnklbpkdaibdccddilifddb"); 1003 "cfhdojbkjhnklbpkdaibdccddilifddb");
(...skipping 10 matching lines...) Expand all
1009 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 1014 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
1010 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 1015 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
1011 } 1016 }
1012 1017
1013 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 1018 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
1014 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 1019 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
1015 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 1020 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
1016 } 1021 }
1017 1022
1018 } // namespace chrome 1023 } // 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