| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // @file | 5 // @file |
| 6 // Content script manager implementation. | 6 // Content script manager implementation. |
| 7 #include "ceee/ie/plugin/scripting/content_script_manager.h" | 7 #include "ceee/ie/plugin/scripting/content_script_manager.h" |
| 8 | 8 |
| 9 #include "ceee/ie/common/ceee_module_util.h" | 9 #include "ceee/ie/common/ceee_module_util.h" |
| 10 #include "ceee/ie/plugin/bho/dom_utils.h" | 10 #include "ceee/ie/plugin/bho/dom_utils.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 } | 234 } |
| 235 | 235 |
| 236 if (!css_content.empty()) | 236 if (!css_content.empty()) |
| 237 return InsertCss(CA2W(css_content.c_str()), document); | 237 return InsertCss(CA2W(css_content.c_str()), document); |
| 238 | 238 |
| 239 return S_OK; | 239 return S_OK; |
| 240 } | 240 } |
| 241 | 241 |
| 242 HRESULT ContentScriptManager::LoadStartScripts(const GURL& match_url, | 242 HRESULT ContentScriptManager::LoadStartScripts(const GURL& match_url, |
| 243 IHTMLDocument2* document) { | 243 IHTMLDocument2* document) { |
| 244 // Run the document end scripts. | 244 // Run the document start scripts. |
| 245 return LoadScriptsImpl(match_url, document, UserScript::DOCUMENT_START); | 245 return LoadScriptsImpl(match_url, document, UserScript::DOCUMENT_START); |
| 246 } | 246 } |
| 247 | 247 |
| 248 HRESULT ContentScriptManager::LoadEndScripts(const GURL& match_url, | 248 HRESULT ContentScriptManager::LoadEndScripts(const GURL& match_url, |
| 249 IHTMLDocument2* document) { | 249 IHTMLDocument2* document) { |
| 250 // Run the document end scripts. | 250 // Run the document end scripts. |
| 251 return LoadScriptsImpl(match_url, document, UserScript::DOCUMENT_END); | 251 return LoadScriptsImpl(match_url, document, UserScript::DOCUMENT_END); |
| 252 } | 252 } |
| 253 | 253 |
| 254 HRESULT ContentScriptManager::LoadScriptsImpl(const GURL& match_url, | 254 HRESULT ContentScriptManager::LoadScriptsImpl(const GURL& match_url, |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 hr = script_host_with_site->SetSite(NULL); | 375 hr = script_host_with_site->SetSite(NULL); |
| 376 DCHECK(SUCCEEDED(hr)); | 376 DCHECK(SUCCEEDED(hr)); |
| 377 } | 377 } |
| 378 | 378 |
| 379 // TODO(siggi@chromium.org): Kill off open extension ports. | 379 // TODO(siggi@chromium.org): Kill off open extension ports. |
| 380 | 380 |
| 381 script_host_.Release(); | 381 script_host_.Release(); |
| 382 | 382 |
| 383 return hr; | 383 return hr; |
| 384 } | 384 } |
| OLD | NEW |