| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <stack> | 5 #include <stack> |
| 6 | 6 |
| 7 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h" | 7 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.h" |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 // Implementation of getExpandedNodes. See description in header for details. | 54 // Implementation of getExpandedNodes. See description in header for details. |
| 55 - (void)getExpandedNodes:(BookmarkExpandedStateTracker::Nodes*)nodes | 55 - (void)getExpandedNodes:(BookmarkExpandedStateTracker::Nodes*)nodes |
| 56 folder:(BookmarkFolderInfo*)info | 56 folder:(BookmarkFolderInfo*)info |
| 57 path:(std::vector<NSUInteger>*)path | 57 path:(std::vector<NSUInteger>*)path |
| 58 root:(id)root; | 58 root:(id)root; |
| 59 @end | 59 @end |
| 60 | 60 |
| 61 // static; implemented for each platform. Update this function for new | 61 // static; implemented for each platform. Update this function for new |
| 62 // classes derived from BookmarkEditorBaseController. | 62 // classes derived from BookmarkEditorBaseController. |
| 63 void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd, | 63 void BookmarkEditor::ShowNative(gfx::NativeWindow parent_hwnd, |
| 64 Profile* profile, | 64 Profile* profile, |
| 65 const BookmarkNode* parent, | 65 const BookmarkNode* parent, |
| 66 const EditDetails& details, | 66 const EditDetails& details, |
| 67 Configuration configuration) { | 67 Configuration configuration) { |
| 68 BookmarkEditorBaseController* controller = nil; | 68 BookmarkEditorBaseController* controller = nil; |
| 69 if (details.type == EditDetails::NEW_FOLDER) { | 69 if (details.type == EditDetails::NEW_FOLDER) { |
| 70 controller = [[BookmarkAllTabsController alloc] | 70 controller = [[BookmarkAllTabsController alloc] |
| 71 initWithParentWindow:parent_hwnd | 71 initWithParentWindow:parent_hwnd |
| 72 profile:profile | 72 profile:profile |
| 73 parent:parent | 73 parent:parent |
| 74 configuration:configuration]; | 74 configuration:configuration]; |
| 75 } else { | 75 } else { |
| 76 controller = [[BookmarkEditorController alloc] | 76 controller = [[BookmarkEditorController alloc] |
| 77 initWithParentWindow:parent_hwnd | 77 initWithParentWindow:parent_hwnd |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 } | 649 } |
| 650 | 650 |
| 651 // Implementing isEqual: allows the NSTreeController to preserve the selection | 651 // Implementing isEqual: allows the NSTreeController to preserve the selection |
| 652 // and open/shut state of outline items when the data changes. | 652 // and open/shut state of outline items when the data changes. |
| 653 - (BOOL)isEqual:(id)other { | 653 - (BOOL)isEqual:(id)other { |
| 654 return [other isKindOfClass:[BookmarkFolderInfo class]] && | 654 return [other isKindOfClass:[BookmarkFolderInfo class]] && |
| 655 folderNode_ == [(BookmarkFolderInfo*)other folderNode]; | 655 folderNode_ == [(BookmarkFolderInfo*)other folderNode]; |
| 656 } | 656 } |
| 657 | 657 |
| 658 @end | 658 @end |
| OLD | NEW |