| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/chrome_extensions_renderer_client.h" | 5 #include "chrome/renderer/extensions/chrome_extensions_renderer_client.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 if (!current_context || !current_context->extension()) | 187 if (!current_context || !current_context->extension()) |
| 188 return false; | 188 return false; |
| 189 | 189 |
| 190 // See http://crbug.com/117446 for the subtlety of this check. | 190 // See http://crbug.com/117446 for the subtlety of this check. |
| 191 switch (current_context->context_type()) { | 191 switch (current_context->context_type()) { |
| 192 case extensions::Feature::UNSPECIFIED_CONTEXT: | 192 case extensions::Feature::UNSPECIFIED_CONTEXT: |
| 193 case extensions::Feature::WEB_PAGE_CONTEXT: | 193 case extensions::Feature::WEB_PAGE_CONTEXT: |
| 194 case extensions::Feature::UNBLESSED_EXTENSION_CONTEXT: | 194 case extensions::Feature::UNBLESSED_EXTENSION_CONTEXT: |
| 195 case extensions::Feature::WEBUI_CONTEXT: | 195 case extensions::Feature::WEBUI_CONTEXT: |
| 196 case extensions::Feature::SERVICE_WORKER_CONTEXT: | 196 case extensions::Feature::SERVICE_WORKER_CONTEXT: |
| 197 case extensions::Feature::LOCK_SCREEN_EXTENSION_CONTEXT: |
| 197 return false; | 198 return false; |
| 198 case extensions::Feature::BLESSED_EXTENSION_CONTEXT: | 199 case extensions::Feature::BLESSED_EXTENSION_CONTEXT: |
| 199 case extensions::Feature::CONTENT_SCRIPT_CONTEXT: | 200 case extensions::Feature::CONTENT_SCRIPT_CONTEXT: |
| 200 return true; | 201 return true; |
| 201 case extensions::Feature::BLESSED_WEB_PAGE_CONTEXT: | 202 case extensions::Feature::BLESSED_WEB_PAGE_CONTEXT: |
| 202 return !current_context->web_frame()->Parent(); | 203 return !current_context->web_frame()->Parent(); |
| 203 default: | 204 default: |
| 204 NOTREACHED(); | 205 NOTREACHED(); |
| 205 return false; | 206 return false; |
| 206 } | 207 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 | 306 |
| 306 void ChromeExtensionsRendererClient::RunScriptsAtDocumentEnd( | 307 void ChromeExtensionsRendererClient::RunScriptsAtDocumentEnd( |
| 307 content::RenderFrame* render_frame) { | 308 content::RenderFrame* render_frame) { |
| 308 extension_dispatcher_->RunScriptsAtDocumentEnd(render_frame); | 309 extension_dispatcher_->RunScriptsAtDocumentEnd(render_frame); |
| 309 } | 310 } |
| 310 | 311 |
| 311 void ChromeExtensionsRendererClient::RunScriptsAtDocumentIdle( | 312 void ChromeExtensionsRendererClient::RunScriptsAtDocumentIdle( |
| 312 content::RenderFrame* render_frame) { | 313 content::RenderFrame* render_frame) { |
| 313 extension_dispatcher_->RunScriptsAtDocumentIdle(render_frame); | 314 extension_dispatcher_->RunScriptsAtDocumentIdle(render_frame); |
| 314 } | 315 } |
| OLD | NEW |