| 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/extensions/api/bookmark_manager_private/bookmark_manage
r_private_api.h" | 5 #include "chrome/browser/extensions/api/bookmark_manager_private/bookmark_manage
r_private_api.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 BookmarkManagerPrivateEventRouter::~BookmarkManagerPrivateEventRouter() { | 183 BookmarkManagerPrivateEventRouter::~BookmarkManagerPrivateEventRouter() { |
| 184 if (bookmark_model_) | 184 if (bookmark_model_) |
| 185 bookmark_model_->RemoveObserver(this); | 185 bookmark_model_->RemoveObserver(this); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void BookmarkManagerPrivateEventRouter::DispatchEvent( | 188 void BookmarkManagerPrivateEventRouter::DispatchEvent( |
| 189 events::HistogramValue histogram_value, | 189 events::HistogramValue histogram_value, |
| 190 const std::string& event_name, | 190 const std::string& event_name, |
| 191 std::unique_ptr<base::ListValue> event_args) { | 191 std::unique_ptr<base::ListValue> event_args) { |
| 192 EventRouter::Get(browser_context_) | 192 EventRouter::Get(browser_context_) |
| 193 ->BroadcastEvent(base::WrapUnique( | 193 ->BroadcastEvent(base::MakeUnique<Event>(histogram_value, event_name, |
| 194 new Event(histogram_value, event_name, std::move(event_args)))); | 194 std::move(event_args))); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void BookmarkManagerPrivateEventRouter::BookmarkModelChanged() {} | 197 void BookmarkManagerPrivateEventRouter::BookmarkModelChanged() {} |
| 198 | 198 |
| 199 void BookmarkManagerPrivateEventRouter::BookmarkModelBeingDeleted( | 199 void BookmarkManagerPrivateEventRouter::BookmarkModelBeingDeleted( |
| 200 BookmarkModel* model) { | 200 BookmarkModel* model) { |
| 201 bookmark_model_ = NULL; | 201 bookmark_model_ = NULL; |
| 202 } | 202 } |
| 203 | 203 |
| 204 void BookmarkManagerPrivateEventRouter::OnWillChangeBookmarkMetaInfo( | 204 void BookmarkManagerPrivateEventRouter::OnWillChangeBookmarkMetaInfo( |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 | 859 |
| 860 RedoInfo::Results::Result result; | 860 RedoInfo::Results::Result result; |
| 861 result.enabled = undo_manager->redo_count() > 0; | 861 result.enabled = undo_manager->redo_count() > 0; |
| 862 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); | 862 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); |
| 863 | 863 |
| 864 results_ = RedoInfo::Results::Create(result); | 864 results_ = RedoInfo::Results::Create(result); |
| 865 return true; | 865 return true; |
| 866 } | 866 } |
| 867 | 867 |
| 868 } // namespace extensions | 868 } // namespace extensions |
| OLD | NEW |