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

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: add API permission check to filtered events :-| Created 8 years, 6 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 void BookmarkExtensionEventRouter::Init() { 141 void BookmarkExtensionEventRouter::Init() {
142 model_->AddObserver(this); 142 model_->AddObserver(this);
143 } 143 }
144 144
145 void BookmarkExtensionEventRouter::DispatchEvent(Profile *profile, 145 void BookmarkExtensionEventRouter::DispatchEvent(Profile *profile,
146 const char* event_name, 146 const char* event_name,
147 const std::string& json_args) { 147 const std::string& json_args) {
148 if (profile->GetExtensionEventRouter()) { 148 if (profile->GetExtensionEventRouter()) {
149 profile->GetExtensionEventRouter()->DispatchEventToRenderers( 149 profile->GetExtensionEventRouter()->DispatchEventToRenderers(
150 event_name, json_args, NULL, GURL()); 150 event_name, json_args, NULL, GURL(), extensions::EventFilteringInfo());
151 } 151 }
152 } 152 }
153 153
154 void BookmarkExtensionEventRouter::Loaded(BookmarkModel* model, 154 void BookmarkExtensionEventRouter::Loaded(BookmarkModel* model,
155 bool ids_reassigned) { 155 bool ids_reassigned) {
156 // TODO(erikkay): Perhaps we should send this event down to the extension 156 // TODO(erikkay): Perhaps we should send this event down to the extension
157 // so they know when it's safe to use the API? 157 // so they know when it's safe to use the API?
158 } 158 }
159 159
160 void BookmarkExtensionEventRouter::BookmarkModelBeingDeleted( 160 void BookmarkExtensionEventRouter::BookmarkModelBeingDeleted(
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 int index, 943 int index,
944 void* params) { 944 void* params) {
945 #if !defined(OS_ANDROID) 945 #if !defined(OS_ANDROID)
946 // Android does not have support for the standard exporter. 946 // Android does not have support for the standard exporter.
947 // TODO(jgreenwald): remove ifdef once extensions are no longer built on 947 // TODO(jgreenwald): remove ifdef once extensions are no longer built on
948 // Android. 948 // Android.
949 bookmark_html_writer::WriteBookmarks(profile(), path, NULL); 949 bookmark_html_writer::WriteBookmarks(profile(), path, NULL);
950 #endif 950 #endif
951 Release(); // Balanced in BookmarksIOFunction::SelectFile() 951 Release(); // Balanced in BookmarksIOFunction::SelectFile()
952 } 952 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698