| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "base/mac_util.h" | 6 #include "base/mac_util.h" |
| 7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_editor.h" | 8 #include "chrome/browser/bookmarks/bookmark_editor.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
| 11 #import "chrome/browser/cocoa/bookmark_editor_controller.h" | 11 #import "chrome/browser/cocoa/bookmark_editor_controller.h" |
| 12 | 12 |
| 13 // static; implemented for each platform. | 13 // static; implemented for each platform. |
| 14 void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd, | 14 void BookmarkEditor::Show(gfx::NativeWindow parent_hwnd, |
| 15 Profile* profile, | 15 Profile* profile, |
| 16 const BookmarkNode* parent, | 16 const BookmarkNode* parent, |
| 17 const BookmarkNode* node, | 17 const EditDetails& details, |
| 18 Configuration configuration, | 18 Configuration configuration, |
| 19 Handler* handler) { | 19 Handler* handler) { |
| 20 if (details.type == EditDetails::NEW_FOLDER) { |
| 21 // TODO(sky): implement this. |
| 22 NOTIMPLEMENTED(); |
| 23 return; |
| 24 } |
| 20 BookmarkEditorController* controller = [[BookmarkEditorController alloc] | 25 BookmarkEditorController* controller = [[BookmarkEditorController alloc] |
| 21 initWithParentWindow:parent_hwnd | 26 initWithParentWindow:parent_hwnd |
| 22 profile:profile | 27 profile:profile |
| 23 parent:parent | 28 parent:parent |
| 24 node:node | 29 node:details.existing_node |
| 25 configuration:configuration | 30 configuration:configuration |
| 26 handler:handler]; | 31 handler:handler]; |
| 27 [controller runAsModalSheet]; | 32 [controller runAsModalSheet]; |
| 28 } | 33 } |
| 29 | 34 |
| 30 | 35 |
| 31 @implementation BookmarkEditorController | 36 @implementation BookmarkEditorController |
| 32 | 37 |
| 33 - (id)initWithParentWindow:(NSWindow*)parentWindow | 38 - (id)initWithParentWindow:(NSWindow*)parentWindow |
| 34 profile:(Profile*)profile | 39 profile:(Profile*)profile |
| 35 parent:(const BookmarkNode*)parent | 40 parent:(const BookmarkNode*)parent |
| 36 node:(const BookmarkNode*)node | 41 node:(const BookmarkNode*)node |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 [urlField_ setStringValue:name]; | 225 [urlField_ setStringValue:name]; |
| 221 [self controlTextDidChange:nil]; | 226 [self controlTextDidChange:nil]; |
| 222 } | 227 } |
| 223 | 228 |
| 224 - (BOOL)okButtonEnabled { | 229 - (BOOL)okButtonEnabled { |
| 225 return [okButton_ isEnabled]; | 230 return [okButton_ isEnabled]; |
| 226 } | 231 } |
| 227 | 232 |
| 228 @end // BookmarkEditorController | 233 @end // BookmarkEditorController |
| 229 | 234 |
| OLD | NEW |