| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_function.h" | 5 #include "chrome/browser/extensions/extension_function.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 9 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 12 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
| 13 #include "chrome/common/extensions/extension_messages.h" | 13 #include "chrome/common/extensions/extension_messages.h" |
| 14 #include "content/browser/renderer_host/render_process_host.h" | 14 #include "content/browser/renderer_host/render_process_host.h" |
| 15 #include "content/browser/renderer_host/render_view_host.h" | 15 #include "content/browser/renderer_host/render_view_host.h" |
| 16 #include "content/browser/user_metrics.h" | 16 #include "content/browser/user_metrics.h" |
| 17 #include "content/public/browser/notification_source.h" | 17 #include "content/public/browser/notification_source.h" |
| 18 #include "content/public/browser/notification_types.h" | 18 #include "content/public/browser/notification_types.h" |
| 19 #include "content/public/common/result_codes.h" | 19 #include "content/public/common/result_codes.h" |
| 20 | 20 |
| 21 using content::BrowserThread; |
| 22 |
| 21 // static | 23 // static |
| 22 void ExtensionFunctionDeleteTraits::Destruct(const ExtensionFunction* x) { | 24 void ExtensionFunctionDeleteTraits::Destruct(const ExtensionFunction* x) { |
| 23 x->Destruct(); | 25 x->Destruct(); |
| 24 } | 26 } |
| 25 | 27 |
| 26 UIThreadExtensionFunction::RenderViewHostTracker::RenderViewHostTracker( | 28 UIThreadExtensionFunction::RenderViewHostTracker::RenderViewHostTracker( |
| 27 UIThreadExtensionFunction* function) | 29 UIThreadExtensionFunction* function) |
| 28 : function_(function) { | 30 : function_(function) { |
| 29 registrar_.Add(this, | 31 registrar_.Add(this, |
| 30 content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, | 32 content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 200 |
| 199 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { | 201 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { |
| 200 } | 202 } |
| 201 | 203 |
| 202 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { | 204 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { |
| 203 } | 205 } |
| 204 | 206 |
| 205 void SyncIOThreadExtensionFunction::Run() { | 207 void SyncIOThreadExtensionFunction::Run() { |
| 206 SendResponse(RunImpl()); | 208 SendResponse(RunImpl()); |
| 207 } | 209 } |
| OLD | NEW |