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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 this, bookmark_manager_private::OnMetaInfoChanged::kEventName); | 262 this, bookmark_manager_private::OnMetaInfoChanged::kEventName); |
263 } | 263 } |
264 | 264 |
265 BookmarkManagerPrivateAPI::~BookmarkManagerPrivateAPI() {} | 265 BookmarkManagerPrivateAPI::~BookmarkManagerPrivateAPI() {} |
266 | 266 |
267 void BookmarkManagerPrivateAPI::Shutdown() { | 267 void BookmarkManagerPrivateAPI::Shutdown() { |
268 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 268 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
269 } | 269 } |
270 | 270 |
271 static base::LazyInstance< | 271 static base::LazyInstance< |
272 BrowserContextKeyedAPIFactory<BookmarkManagerPrivateAPI> > g_factory = | 272 BrowserContextKeyedAPIFactory<BookmarkManagerPrivateAPI>>::DestructorAtExit |
273 LAZY_INSTANCE_INITIALIZER; | 273 g_factory = LAZY_INSTANCE_INITIALIZER; |
274 | 274 |
275 // static | 275 // static |
276 BrowserContextKeyedAPIFactory<BookmarkManagerPrivateAPI>* | 276 BrowserContextKeyedAPIFactory<BookmarkManagerPrivateAPI>* |
277 BookmarkManagerPrivateAPI::GetFactoryInstance() { | 277 BookmarkManagerPrivateAPI::GetFactoryInstance() { |
278 return g_factory.Pointer(); | 278 return g_factory.Pointer(); |
279 } | 279 } |
280 | 280 |
281 void BookmarkManagerPrivateAPI::OnListenerAdded( | 281 void BookmarkManagerPrivateAPI::OnListenerAdded( |
282 const EventListenerInfo& details) { | 282 const EventListenerInfo& details) { |
283 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 283 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 | 860 |
861 RedoInfo::Results::Result result; | 861 RedoInfo::Results::Result result; |
862 result.enabled = undo_manager->redo_count() > 0; | 862 result.enabled = undo_manager->redo_count() > 0; |
863 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); | 863 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); |
864 | 864 |
865 results_ = RedoInfo::Results::Create(result); | 865 results_ = RedoInfo::Results::Create(result); |
866 return true; | 866 return true; |
867 } | 867 } |
868 | 868 |
869 } // namespace extensions | 869 } // namespace extensions |
OLD | NEW |