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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
789 params->meta_info_changes.additional_properties); | 789 params->meta_info_changes.additional_properties); |
790 if (node->GetMetaInfoMap()) { | 790 if (node->GetMetaInfoMap()) { |
791 new_meta_info.insert(node->GetMetaInfoMap()->begin(), | 791 new_meta_info.insert(node->GetMetaInfoMap()->begin(), |
792 node->GetMetaInfoMap()->end()); | 792 node->GetMetaInfoMap()->end()); |
793 } | 793 } |
794 model->SetNodeMetaInfoMap(node, new_meta_info); | 794 model->SetNodeMetaInfoMap(node, new_meta_info); |
795 | 795 |
796 return true; | 796 return true; |
797 } | 797 } |
798 | 798 |
799 bool BookmarkManagerPrivateCanOpenNewWindowsFunction::RunOnReady() { | |
800 bool can_open_new_windows = true; | |
benwells
2017/04/13 01:09:17
Seemed like a very useful function.
Dan Beam
2017/04/18 02:38:37
reminds me of this lovely function:
https://cs.chr
| |
801 SetResult(base::MakeUnique<base::Value>(can_open_new_windows)); | |
802 return true; | |
803 } | |
804 | |
805 bool BookmarkManagerPrivateRemoveTreesFunction::RunOnReady() { | 799 bool BookmarkManagerPrivateRemoveTreesFunction::RunOnReady() { |
806 if (!EditBookmarksEnabled()) | 800 if (!EditBookmarksEnabled()) |
807 return false; | 801 return false; |
808 | 802 |
809 std::unique_ptr<RemoveTrees::Params> params( | 803 std::unique_ptr<RemoveTrees::Params> params( |
810 RemoveTrees::Params::Create(*args_)); | 804 RemoveTrees::Params::Create(*args_)); |
811 EXTENSION_FUNCTION_VALIDATE(params); | 805 EXTENSION_FUNCTION_VALIDATE(params); |
812 | 806 |
813 BookmarkModel* model = GetBookmarkModel(); | 807 BookmarkModel* model = GetBookmarkModel(); |
814 bookmarks::ManagedBookmarkService* managed = GetManagedBookmarkService(); | 808 bookmarks::ManagedBookmarkService* managed = GetManagedBookmarkService(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
860 | 854 |
861 RedoInfo::Results::Result result; | 855 RedoInfo::Results::Result result; |
862 result.enabled = undo_manager->redo_count() > 0; | 856 result.enabled = undo_manager->redo_count() > 0; |
863 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); | 857 result.label = base::UTF16ToUTF8(undo_manager->GetRedoLabel()); |
864 | 858 |
865 results_ = RedoInfo::Results::Create(result); | 859 results_ = RedoInfo::Results::Create(result); |
866 return true; | 860 return true; |
867 } | 861 } |
868 | 862 |
869 } // namespace extensions | 863 } // namespace extensions |
OLD | NEW |