Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: chrome/browser/bookmarks/bookmark_extension_api.cc

Issue 10514013: Filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, reland Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698