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/bookmarks/bookmark_extension_api.h" | 5 #include "chrome/browser/bookmarks/bookmark_extension_api.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/i18n/file_util_icu.h" | 9 #include "base/i18n/file_util_icu.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 void BookmarkExtensionEventRouter::Init() { | 142 void BookmarkExtensionEventRouter::Init() { |
143 model_->AddObserver(this); | 143 model_->AddObserver(this); |
144 } | 144 } |
145 | 145 |
146 void BookmarkExtensionEventRouter::DispatchEvent(Profile *profile, | 146 void BookmarkExtensionEventRouter::DispatchEvent(Profile *profile, |
147 const char* event_name, | 147 const char* event_name, |
148 const std::string& json_args) { | 148 const std::string& json_args) { |
149 if (profile->GetExtensionEventRouter()) { | 149 if (profile->GetExtensionEventRouter()) { |
150 profile->GetExtensionEventRouter()->DispatchEventToRenderers( | 150 profile->GetExtensionEventRouter()->DispatchEventToRenderers( |
151 event_name, json_args, NULL, GURL()); | 151 event_name, json_args, NULL, GURL(), extensions::EventFilteringInfo()); |
152 } | 152 } |
153 } | 153 } |
154 | 154 |
155 void BookmarkExtensionEventRouter::Loaded(BookmarkModel* model, | 155 void BookmarkExtensionEventRouter::Loaded(BookmarkModel* model, |
156 bool ids_reassigned) { | 156 bool ids_reassigned) { |
157 // TODO(erikkay): Perhaps we should send this event down to the extension | 157 // TODO(erikkay): Perhaps we should send this event down to the extension |
158 // so they know when it's safe to use the API? | 158 // so they know when it's safe to use the API? |
159 } | 159 } |
160 | 160 |
161 void BookmarkExtensionEventRouter::BookmarkModelBeingDeleted( | 161 void BookmarkExtensionEventRouter::BookmarkModelBeingDeleted( |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 int index, | 945 int index, |
946 void* params) { | 946 void* params) { |
947 #if !defined(OS_ANDROID) | 947 #if !defined(OS_ANDROID) |
948 // Android does not have support for the standard exporter. | 948 // Android does not have support for the standard exporter. |
949 // TODO(jgreenwald): remove ifdef once extensions are no longer built on | 949 // TODO(jgreenwald): remove ifdef once extensions are no longer built on |
950 // Android. | 950 // Android. |
951 bookmark_html_writer::WriteBookmarks(profile(), path, NULL); | 951 bookmark_html_writer::WriteBookmarks(profile(), path, NULL); |
952 #endif | 952 #endif |
953 Release(); // Balanced in BookmarksIOFunction::SelectFile() | 953 Release(); // Balanced in BookmarksIOFunction::SelectFile() |
954 } | 954 } |
OLD | NEW |