| 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/browser/extensions/chrome_extension_web_contents_observer.h" | 5 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/api/messaging/message_service.h" | 7 #include "chrome/browser/extensions/api/messaging/message_service.h" |
| 8 #include "chrome/browser/extensions/error_console/error_console.h" | 8 #include "chrome/browser/extensions/error_console/error_console.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/common/extensions/api/messaging/message.h" | |
| 11 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| 12 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
| 13 #include "content/public/browser/render_process_host.h" | 12 #include "content/public/browser/render_process_host.h" |
| 14 #include "content/public/browser/render_view_host.h" | 13 #include "content/public/browser/render_view_host.h" |
| 15 #include "extensions/browser/extension_registry.h" | 14 #include "extensions/browser/extension_registry.h" |
| 16 #include "extensions/browser/extension_system.h" | 15 #include "extensions/browser/extension_system.h" |
| 16 #include "extensions/common/api/messaging/message.h" |
| 17 #include "extensions/common/extension_messages.h" | 17 #include "extensions/common/extension_messages.h" |
| 18 #include "extensions/common/extension_urls.h" | 18 #include "extensions/common/extension_urls.h" |
| 19 | 19 |
| 20 using content::BrowserContext; | 20 using content::BrowserContext; |
| 21 | 21 |
| 22 DEFINE_WEB_CONTENTS_USER_DATA_KEY( | 22 DEFINE_WEB_CONTENTS_USER_DATA_KEY( |
| 23 extensions::ChromeExtensionWebContentsObserver); | 23 extensions::ChromeExtensionWebContentsObserver); |
| 24 | 24 |
| 25 namespace extensions { | 25 namespace extensions { |
| 26 | 26 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // TODO(yoz): This reload doesn't happen synchronously for unpacked | 95 // TODO(yoz): This reload doesn't happen synchronously for unpacked |
| 96 // extensions. It seems to be fast enough, but there is a race. | 96 // extensions. It seems to be fast enough, but there is a race. |
| 97 // We should delay loading until the extension has reloaded. | 97 // We should delay loading until the extension has reloaded. |
| 98 if (registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED)) { | 98 if (registry->GetExtensionById(extension_id, ExtensionRegistry::TERMINATED)) { |
| 99 ExtensionSystem::Get(browser_context())-> | 99 ExtensionSystem::Get(browser_context())-> |
| 100 extension_service()->ReloadExtension(extension_id); | 100 extension_service()->ReloadExtension(extension_id); |
| 101 } | 101 } |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace extensions | 104 } // namespace extensions |
| OLD | NEW |