| 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/views/bookmark_folder_tree_view.h" | 5 #include "chrome/browser/views/bookmark_folder_tree_view.h" |
| 6 | 6 |
| 7 #include "app/drag_drop_types.h" |
| 8 #include "app/os_exchange_data.h" |
| 7 #include "base/base_drag_source.h" | 9 #include "base/base_drag_source.h" |
| 8 #include "chrome/browser/bookmarks/bookmark_utils.h" | 10 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 9 #include "chrome/browser/bookmarks/bookmark_model.h" | 11 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 10 #include "chrome/browser/bookmarks/bookmark_folder_tree_model.h" | 12 #include "chrome/browser/bookmarks/bookmark_folder_tree_model.h" |
| 11 #include "chrome/browser/profile.h" | 13 #include "chrome/browser/profile.h" |
| 12 #include "chrome/common/drag_drop_types.h" | |
| 13 #include "chrome/common/os_exchange_data.h" | |
| 14 #include "chrome/views/view_constants.h" | 14 #include "chrome/views/view_constants.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 | 16 |
| 17 void BookmarkFolderTreeView::DropInfo::Scrolled() { | 17 void BookmarkFolderTreeView::DropInfo::Scrolled() { |
| 18 view_->UpdateDropInfo(); | 18 view_->UpdateDropInfo(); |
| 19 } | 19 } |
| 20 | 20 |
| 21 BookmarkFolderTreeView::BookmarkFolderTreeView(Profile* profile, | 21 BookmarkFolderTreeView::BookmarkFolderTreeView(Profile* profile, |
| 22 BookmarkFolderTreeModel* model) | 22 BookmarkFolderTreeModel* model) |
| 23 : views::TreeView(), | 23 : views::TreeView(), |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 if (position.on || position.index == position.parent->GetChildCount()) | 294 if (position.on || position.index == position.parent->GetChildCount()) |
| 295 return parent_node->GetChildCount(); | 295 return parent_node->GetChildCount(); |
| 296 | 296 |
| 297 if (position.index != 0) { | 297 if (position.index != 0) { |
| 298 return parent_node->IndexOfChild( | 298 return parent_node->IndexOfChild( |
| 299 TreeNodeAsBookmarkNode(position.parent->GetChild(position.index))); | 299 TreeNodeAsBookmarkNode(position.parent->GetChild(position.index))); |
| 300 } | 300 } |
| 301 | 301 |
| 302 return 0; | 302 return 0; |
| 303 } | 303 } |
| OLD | NEW |