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 #include "chrome/browser/extensions/execute_code_in_tab_function.h" | 5 #include "chrome/browser/extensions/execute_code_in_tab_function.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/extensions/extension_tabs_module.h" | 10 #include "chrome/browser/extensions/extension_tabs_module.h" |
11 #include "chrome/browser/extensions/extension_tabs_module_constants.h" | 11 #include "chrome/browser/extensions/extension_tabs_module_constants.h" |
12 #include "chrome/browser/extensions/extensions_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
13 #include "chrome/browser/extensions/file_reader.h" | 13 #include "chrome/browser/extensions/file_reader.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/tab_contents/tab_contents.h" | 15 #include "chrome/browser/tab_contents/tab_contents.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
18 #include "chrome/common/extensions/extension.h" | 18 #include "chrome/common/extensions/extension.h" |
19 #include "chrome/common/extensions/extension_constants.h" | 19 #include "chrome/common/extensions/extension_constants.h" |
20 #include "chrome/common/extensions/extension_error_utils.h" | 20 #include "chrome/common/extensions/extension_error_utils.h" |
21 #include "chrome/common/notification_service.h" | 21 #include "chrome/common/notification_service.h" |
22 | 22 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 void ExecuteCodeInTabFunction::Observe(NotificationType type, | 186 void ExecuteCodeInTabFunction::Observe(NotificationType type, |
187 const NotificationSource& source, | 187 const NotificationSource& source, |
188 const NotificationDetails& details) { | 188 const NotificationDetails& details) { |
189 std::pair<int, bool>* result_details = | 189 std::pair<int, bool>* result_details = |
190 Details<std::pair<int, bool> >(details).ptr(); | 190 Details<std::pair<int, bool> >(details).ptr(); |
191 if (result_details->first == request_id()) { | 191 if (result_details->first == request_id()) { |
192 SendResponse(result_details->second); | 192 SendResponse(result_details->second); |
193 Release(); // balanced in Execute() | 193 Release(); // balanced in Execute() |
194 } | 194 } |
195 } | 195 } |
OLD | NEW |