| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/bookmarks/bookmark_utils.h" | 5 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 6 | 6 |
| 7 #include "app/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
| 8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
| 9 // TODO(port): Port these files. | 9 // TODO(port): Port these files. |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 #if defined(OS_WIN) | 361 #if defined(OS_WIN) |
| 362 OSExchangeData* data = new OSExchangeData(); | 362 OSExchangeData* data = new OSExchangeData(); |
| 363 BookmarkDragData(nodes).Write(NULL, data); | 363 BookmarkDragData(nodes).Write(NULL, data); |
| 364 OleSetClipboard(data); | 364 OleSetClipboard(data); |
| 365 // OLE takes ownership of OSExchangeData. | 365 // OLE takes ownership of OSExchangeData. |
| 366 #else | 366 #else |
| 367 // TODO(port): Clipboard integration. Don't we have clipboard | 367 // TODO(port): Clipboard integration. Don't we have clipboard |
| 368 // implemented somewhere else? | 368 // implemented somewhere else? |
| 369 #endif | 369 #endif |
| 370 | 370 |
| 371 // The following works cross-platform but I'm disabling it for now so that |
| 372 // users who Cut a bookmark or folder won't lose it without being able to |
| 373 // paste it. |
| 374 #if defind(OS_WIN) |
| 371 if (remove_nodes) { | 375 if (remove_nodes) { |
| 372 for (size_t i = 0; i < nodes.size(); ++i) { | 376 for (size_t i = 0; i < nodes.size(); ++i) { |
| 373 model->Remove(nodes[i]->GetParent(), | 377 model->Remove(nodes[i]->GetParent(), |
| 374 nodes[i]->GetParent()->IndexOfChild(nodes[i])); | 378 nodes[i]->GetParent()->IndexOfChild(nodes[i])); |
| 375 } | 379 } |
| 376 } | 380 } |
| 381 #endif |
| 377 } | 382 } |
| 378 | 383 |
| 379 void PasteFromClipboard(BookmarkModel* model, | 384 void PasteFromClipboard(BookmarkModel* model, |
| 380 const BookmarkNode* parent, | 385 const BookmarkNode* parent, |
| 381 int index) { | 386 int index) { |
| 382 if (!parent) | 387 if (!parent) |
| 383 return; | 388 return; |
| 384 | 389 |
| 385 #if defined(OS_WIN) | 390 #if defined(OS_WIN) |
| 386 IDataObject* data; | 391 IDataObject* data; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 | 630 |
| 626 // Formerly in BookmarkTableView | 631 // Formerly in BookmarkTableView |
| 627 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth1, -1); | 632 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth1, -1); |
| 628 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth1, -1); | 633 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth1, -1); |
| 629 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth2, -1); | 634 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth2, -1); |
| 630 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth2, -1); | 635 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth2, -1); |
| 631 prefs->RegisterIntegerPref(prefs::kBookmarkTablePathWidth, -1); | 636 prefs->RegisterIntegerPref(prefs::kBookmarkTablePathWidth, -1); |
| 632 } | 637 } |
| 633 | 638 |
| 634 } // namespace bookmark_utils | 639 } // namespace bookmark_utils |
| OLD | NEW |