| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/download/download_extension_api.h" | 5 #include "chrome/browser/download/download_extension_api.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cctype> | 8 #include <cctype> |
| 9 #include <iterator> | 9 #include <iterator> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 DownloadManager* manager) { | 1059 DownloadManager* manager) { |
| 1060 manager_->RemoveObserver(this); | 1060 manager_->RemoveObserver(this); |
| 1061 manager_ = NULL; | 1061 manager_ = NULL; |
| 1062 } | 1062 } |
| 1063 | 1063 |
| 1064 void ExtensionDownloadsEventRouter::DispatchEvent( | 1064 void ExtensionDownloadsEventRouter::DispatchEvent( |
| 1065 const char* event_name, base::Value* arg) { | 1065 const char* event_name, base::Value* arg) { |
| 1066 ListValue args; | 1066 ListValue args; |
| 1067 args.Append(arg); | 1067 args.Append(arg); |
| 1068 std::string json_args; | 1068 std::string json_args; |
| 1069 base::JSONWriter::Write(&args, false, &json_args); | 1069 base::JSONWriter::Write(&args, &json_args); |
| 1070 profile_->GetExtensionEventRouter()->DispatchEventToRenderers( | 1070 profile_->GetExtensionEventRouter()->DispatchEventToRenderers( |
| 1071 event_name, | 1071 event_name, |
| 1072 json_args, | 1072 json_args, |
| 1073 profile_, | 1073 profile_, |
| 1074 GURL()); | 1074 GURL()); |
| 1075 } | 1075 } |
| OLD | NEW |