| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 using content::BrowserThread; | 21 using content::BrowserThread; |
| 22 | 22 |
| 23 // static | 23 // static |
| 24 void ExtensionFunctionDeleteTraits::Destruct(const ExtensionFunction* x) { | 24 void ExtensionFunctionDeleteTraits::Destruct(const ExtensionFunction* x) { |
| 25 x->Destruct(); | 25 x->Destruct(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 UIThreadExtensionFunction::RenderViewHostTracker::RenderViewHostTracker( | 28 UIThreadExtensionFunction::RenderViewHostTracker::RenderViewHostTracker( |
| 29 UIThreadExtensionFunction* function, | 29 UIThreadExtensionFunction* function, |
| 30 RenderViewHost* render_view_host) | 30 RenderViewHost* render_view_host) |
| 31 : RenderViewHostObserver(render_view_host), | 31 : content::RenderViewHostObserver(render_view_host), |
| 32 function_(function) { | 32 function_(function) { |
| 33 registrar_.Add(this, | 33 registrar_.Add(this, |
| 34 content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, | 34 content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, |
| 35 content::Source<RenderViewHost>(function->render_view_host())); | 35 content::Source<RenderViewHost>(function->render_view_host())); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void UIThreadExtensionFunction::RenderViewHostTracker::Observe( | 38 void UIThreadExtensionFunction::RenderViewHostTracker::Observe( |
| 39 int type, | 39 int type, |
| 40 const content::NotificationSource& source, | 40 const content::NotificationSource& source, |
| 41 const content::NotificationDetails& details) { | 41 const content::NotificationDetails& details) { |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { | 230 SyncIOThreadExtensionFunction::SyncIOThreadExtensionFunction() { |
| 231 } | 231 } |
| 232 | 232 |
| 233 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { | 233 SyncIOThreadExtensionFunction::~SyncIOThreadExtensionFunction() { |
| 234 } | 234 } |
| 235 | 235 |
| 236 void SyncIOThreadExtensionFunction::Run() { | 236 void SyncIOThreadExtensionFunction::Run() { |
| 237 SendResponse(RunImpl()); | 237 SendResponse(RunImpl()); |
| 238 } | 238 } |
| OLD | NEW |