diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-13 18:54:20 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-13 18:54:20 +0000 |
commit | 992c625bf2d6dfaaa46cf5b45cdcd7de68e7817e (patch) | |
tree | ae6467a99cf17115e04af5bbe358a6219f9c9808 | |
parent | b83fed38db16e462afa3051dcad21318c62b2357 (diff) | |
download | chromium_src-992c625bf2d6dfaaa46cf5b45cdcd7de68e7817e.zip chromium_src-992c625bf2d6dfaaa46cf5b45cdcd7de68e7817e.tar.gz chromium_src-992c625bf2d6dfaaa46cf5b45cdcd7de68e7817e.tar.bz2 |
Move tree-related classes that Linux code depends on from views/ to app/
TEST=If it compiles and unit_tests pass, it's ok. Just moving files around.
http://crbug.com/11066
Review URL: http://codereview.chromium.org/115185
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15982 0039d316-1c4b-4281-b951-d872f2087c98
21 files changed, 86 insertions, 96 deletions
diff --git a/app/app.vcproj b/app/app.vcproj index d940bf9..64b07d87 100644 --- a/app/app.vcproj +++ b/app/app.vcproj @@ -262,6 +262,18 @@ >
</File>
<File
+ RelativePath=".\tree_model.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tree_node_iterator.h"
+ >
+ </File>
+ <File
+ RelativePath=".\tree_node_model.h"
+ >
+ </File>
+ <File
RelativePath=".\win_util.cc"
>
</File>
diff --git a/views/controls/tree/tree_model.h b/app/tree_model.h index 7fec5a8..e7b93ee 100644 --- a/views/controls/tree/tree_model.h +++ b/app/tree_model.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef VIEWS_CONTROLS_TREE_TREE_MODEL_H_ -#define VIEWS_CONTROLS_TREE_TREE_MODEL_H_ +#ifndef APP_TREE_MODEL_H_ +#define APP_TREE_MODEL_H_ #include <string> @@ -11,8 +11,6 @@ class SkBitmap; -namespace views { - class TreeModel; // TreeModelNode -------------------------------------------------------------- @@ -86,6 +84,4 @@ class TreeModel { virtual int GetIconIndex(TreeModelNode* node) { return -1; } }; -} // namespace views - -#endif // VIEWS_CONTROLS_TREE_TREE_MODEL_H_ +#endif // APP_TREE_TREE_MODEL_H_ diff --git a/views/controls/tree/tree_node_iterator.h b/app/tree_node_iterator.h index 76618e7..7e7398c 100644 --- a/views/controls/tree/tree_node_iterator.h +++ b/app/tree_node_iterator.h @@ -2,16 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef VIEWS_CONTROLS_TREE_TREE_NODE_ITERATOR_H_ -#define VIEWS_CONTROLS_TREE_TREE_NODE_ITERATOR_H_ +#ifndef APP_TREE_NODE_ITERATOR_H_ +#define APP_TREE_NODE_ITERATOR_H_ #include <stack> #include "base/basictypes.h" #include "base/logging.h" -namespace views { - // Iterator that iterates over the descendants of a node. The iteration does // not include the node itself, only the descendants. The following illustrates // typical usage: @@ -69,6 +67,4 @@ class TreeNodeIterator { DISALLOW_COPY_AND_ASSIGN(TreeNodeIterator); }; -} // namespace views - -#endif // VIEWS_CONTROLS_TREE_TREE_NODE_ITERATOR_H_ +#endif // APP_TREE_NODE_ITERATOR_H_ diff --git a/views/controls/tree/tree_node_iterator_unittest.cc b/app/tree_node_iterator_unittest.cc index e5353fc..c20babe 100644 --- a/views/controls/tree/tree_node_iterator_unittest.cc +++ b/app/tree_node_iterator_unittest.cc @@ -4,14 +4,12 @@ #include "testing/gtest/include/gtest/gtest.h" -#include "views/controls/tree/tree_node_iterator.h" -#include "views/controls/tree/tree_node_model.h" +#include "app/tree_node_iterator.h" +#include "app/tree_node_model.h" -typedef testing::Test TreeNodeIteratorTest; +namespace { -using views::TreeNodeWithValue; - -TEST_F(TreeNodeIteratorTest, Test) { +TEST(TreeNodeIteratorTest, Test) { TreeNodeWithValue<int> root; root.Add(0, new TreeNodeWithValue<int>(1)); root.Add(1, new TreeNodeWithValue<int>(2)); @@ -21,7 +19,7 @@ TEST_F(TreeNodeIteratorTest, Test) { f3->Add(0, f4); f4->Add(0, new TreeNodeWithValue<int>(5)); - views::TreeNodeIterator<TreeNodeWithValue<int> > iterator(&root); + TreeNodeIterator<TreeNodeWithValue<int> > iterator(&root); ASSERT_TRUE(iterator.has_next()); ASSERT_EQ(root.GetChild(0), iterator.Next()); @@ -39,3 +37,5 @@ TEST_F(TreeNodeIteratorTest, Test) { ASSERT_FALSE(iterator.has_next()); } + +} // namespace diff --git a/views/controls/tree/tree_node_model.h b/app/tree_node_model.h index f1e1c16..69d5c8d 100644 --- a/views/controls/tree/tree_node_model.h +++ b/app/tree_node_model.h @@ -2,19 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef VIEWS_CONTROLS_TREE_TREE_NODE_MODEL_H_ -#define VIEWS_CONTROLS_TREE_TREE_NODE_MODEL_H_ +#ifndef APP_TREE_NODE_MODEL_H_ +#define APP_TREE_NODE_MODEL_H_ #include <algorithm> #include <vector> +#include "app/tree_model.h" #include "base/basictypes.h" #include "base/scoped_ptr.h" #include "base/scoped_vector.h" #include "base/stl_util-inl.h" -#include "views/controls/tree/tree_model.h" - -namespace views { // TreeNodeModel and TreeNodes provide an implementation of TreeModel around // TreeNodes. TreeNodes form a directed acyclic graph. @@ -278,6 +276,4 @@ class TreeNodeModel : public TreeModel { DISALLOW_COPY_AND_ASSIGN(TreeNodeModel); }; -} // namespace views - -#endif // VIEWS_CONTROLS_TREE_TREE_NODE_MODEL_H_ +#endif // APP_TREE_NODE_MODEL_H_ diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index de84e86..f7aa80f 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -27,7 +27,9 @@ #include "chrome/common/ipc_sync_channel.h" #include "chrome/common/notification_observer.h" #include "chrome/test/automation/automation_messages.h" +#if defined(OS_WIN) #include "views/event.h" +#endif // defined(OS_WIN) #if defined(OS_WIN) // TODO(port): enable these. diff --git a/chrome/browser/bookmarks/bookmark_folder_tree_model.cc b/chrome/browser/bookmarks/bookmark_folder_tree_model.cc index 3f1530f..ad03b61 100644 --- a/chrome/browser/bookmarks/bookmark_folder_tree_model.cc +++ b/chrome/browser/bookmarks/bookmark_folder_tree_model.cc @@ -10,7 +10,7 @@ #include "grit/theme_resources.h" BookmarkFolderTreeModel::BookmarkFolderTreeModel(BookmarkModel* model) - : views::TreeNodeModel<FolderNode>(new FolderNode(NULL)), + : TreeNodeModel<FolderNode>(new FolderNode(NULL)), model_(model), recently_bookmarked_node_(new FolderNode(NULL)), search_node_(new FolderNode(NULL)){ @@ -29,7 +29,7 @@ BookmarkFolderTreeModel::~BookmarkFolderTreeModel() { } BookmarkFolderTreeModel::NodeType BookmarkFolderTreeModel::GetNodeType( - views::TreeModelNode* node) { + TreeModelNode* node) { if (node == recently_bookmarked_node_) return RECENTLY_BOOKMARKED; if (node == search_node_) @@ -48,7 +48,7 @@ FolderNode* BookmarkFolderTreeModel::GetFolderNodeForBookmarkNode( } BookmarkNode* BookmarkFolderTreeModel::TreeNodeAsBookmarkNode( - views::TreeModelNode* node) { + TreeModelNode* node) { if (GetNodeType(node) != BOOKMARK) return NULL; return AsNode(node)->value; @@ -170,7 +170,7 @@ void BookmarkFolderTreeModel::GetIcons(std::vector<SkBitmap>* icons) { icons->push_back(*rb.GetBitmapNamed(IDR_BOOKMARK_MANAGER_SEARCH_ICON)); } -int BookmarkFolderTreeModel::GetIconIndex(views::TreeModelNode* node) { +int BookmarkFolderTreeModel::GetIconIndex(TreeModelNode* node) { if (node == recently_bookmarked_node_) return 0; if (node == search_node_) diff --git a/chrome/browser/bookmarks/bookmark_folder_tree_model.h b/chrome/browser/bookmarks/bookmark_folder_tree_model.h index ce62ed0..4faff4e 100644 --- a/chrome/browser/bookmarks/bookmark_folder_tree_model.h +++ b/chrome/browser/bookmarks/bookmark_folder_tree_model.h @@ -5,16 +5,18 @@ #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_FOLDER_TREE_MODEL_H_ #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_FOLDER_TREE_MODEL_H_ +#include <vector> + +#include "app/tree_node_model.h" #include "chrome/browser/bookmarks/bookmark_model.h" -#include "views/controls/tree/tree_node_model.h" // The type of nodes created by BookmarkFolderTreeModel. -typedef views::TreeNodeWithValue<BookmarkNode*> FolderNode; +typedef TreeNodeWithValue<BookmarkNode*> FolderNode; // TreeModel implementation that shows the folders from the BookmarkModel. // The root node contains the following nodes: // bookmark bar, other folders, recently bookmarked and search. -class BookmarkFolderTreeModel : public views::TreeNodeModel<FolderNode>, +class BookmarkFolderTreeModel : public TreeNodeModel<FolderNode>, public BookmarkModelObserver { public: // Type of the node. @@ -30,19 +32,19 @@ class BookmarkFolderTreeModel : public views::TreeNodeModel<FolderNode>, ~BookmarkFolderTreeModel(); // The tree is not editable. - virtual void SetTitle(views::TreeModelNode* node, const std::wstring& title) { + virtual void SetTitle(TreeModelNode* node, const std::wstring& title) { NOTREACHED(); } // Returns the type of the specified node. - NodeType GetNodeType(views::TreeModelNode* node); + NodeType GetNodeType(TreeModelNode* node); // Returns the FolderNode for the specified BookmarkNode. FolderNode* GetFolderNodeForBookmarkNode(BookmarkNode* node); // Converts the tree node into a BookmarkNode. Returns NULL if |node| is NULL // or not of NodeType::BOOKMARK. - BookmarkNode* TreeNodeAsBookmarkNode(views::TreeModelNode* node); + BookmarkNode* TreeNodeAsBookmarkNode(TreeModelNode* node); // Returns the search node. FolderNode* search_node() const { return search_node_; } @@ -73,7 +75,7 @@ class BookmarkFolderTreeModel : public views::TreeNodeModel<FolderNode>, // The following are overriden to return custom icons for the recently // bookmarked and search nodes. virtual void GetIcons(std::vector<SkBitmap>* icons); - virtual int GetIconIndex(views::TreeModelNode* node); + virtual int GetIconIndex(TreeModelNode* node); private: // Invoked from the constructor to create the children of the root node. diff --git a/chrome/browser/bookmarks/bookmark_folder_tree_model_unittest.cc b/chrome/browser/bookmarks/bookmark_folder_tree_model_unittest.cc index 0fe6ce9..ce50564 100644 --- a/chrome/browser/bookmarks/bookmark_folder_tree_model_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_folder_tree_model_unittest.cc @@ -22,7 +22,7 @@ // a1 // g1 class BookmarkFolderTreeModelTest : public testing::Test, - public views::TreeModelObserver { + public TreeModelObserver { public: BookmarkFolderTreeModelTest() : url1_("http://1"), @@ -61,27 +61,27 @@ class BookmarkFolderTreeModelTest : public testing::Test, return profile_->GetBookmarkModel(); } - virtual void TreeNodesAdded(views::TreeModel* model, - views::TreeModelNode* parent, + virtual void TreeNodesAdded(TreeModel* model, + TreeModelNode* parent, int start, int count) { added_count_++; } - virtual void TreeNodesRemoved(views::TreeModel* model, - views::TreeModelNode* parent, + virtual void TreeNodesRemoved(TreeModel* model, + TreeModelNode* parent, int start, int count) { removed_count_++; } - virtual void TreeNodeChanged(views::TreeModel* model, - views::TreeModelNode* node) { + virtual void TreeNodeChanged(TreeModel* model, + TreeModelNode* node) { changed_count_++; } - virtual void TreeNodeChildrenReordered(views::TreeModel* model, - views::TreeModelNode* parent) { + virtual void TreeNodeChildrenReordered(TreeModel* model, + TreeModelNode* parent) { reordered_count_++; } @@ -118,7 +118,7 @@ class BookmarkFolderTreeModelTest : public testing::Test, // and other folders matches the initial state. TEST_F(BookmarkFolderTreeModelTest, InitialState) { // Verify the first 4 nodes. - views::TreeModelNode* root = model_->GetRoot(); + TreeModelNode* root = model_->GetRoot(); ASSERT_EQ(4, model_->GetChildCount(root)); EXPECT_EQ(BookmarkFolderTreeModel::BOOKMARK, model_->GetNodeType(model_->GetChild(root, 0))); @@ -130,7 +130,7 @@ TEST_F(BookmarkFolderTreeModelTest, InitialState) { model_->GetNodeType(model_->GetChild(root, 3))); // Verify the contents of the bookmark bar node. - views::TreeModelNode* bb_node = model_->GetChild(root, 0); + TreeModelNode* bb_node = model_->GetChild(root, 0); EXPECT_TRUE(model_->TreeNodeAsBookmarkNode(bb_node) == bookmark_model()->GetBookmarkBarNode()); ASSERT_EQ(1, model_->GetChildCount(bb_node)); @@ -138,7 +138,7 @@ TEST_F(BookmarkFolderTreeModelTest, InitialState) { bookmark_model()->GetBookmarkBarNode()->GetChild(1)); // Verify the contents of the other folders node. - views::TreeModelNode* other_node = model_->GetChild(root, 1); + TreeModelNode* other_node = model_->GetChild(root, 1); EXPECT_TRUE(model_->TreeNodeAsBookmarkNode(other_node) == bookmark_model()->other_node()); ASSERT_EQ(1, model_->GetChildCount(other_node)); diff --git a/chrome/browser/bookmarks/bookmark_model.h b/chrome/browser/bookmarks/bookmark_model.h index ac32fc0..f605dec 100644 --- a/chrome/browser/bookmarks/bookmark_model.h +++ b/chrome/browser/bookmarks/bookmark_model.h @@ -10,6 +10,7 @@ #include <set> #include <vector> +#include "app/tree_node_model.h" #include "base/lock.h" #include "base/observer_list.h" #include "base/waitable_event.h" @@ -22,7 +23,6 @@ #include "googleurl/src/gurl.h" #include "third_party/skia/include/core/SkBitmap.h" #include "testing/gtest/include/gtest/gtest_prod.h" -#include "views/controls/tree/tree_node_model.h" class BookmarkEditorView; class BookmarkModel; @@ -38,7 +38,7 @@ class StarredURLDatabase; // BookmarkNode contains information about a starred entry: title, URL, favicon, // star id and type. BookmarkNodes are returned from a BookmarkModel. // -class BookmarkNode : public views::TreeNode<BookmarkNode> { +class BookmarkNode : public TreeNode<BookmarkNode> { friend class BookmarkModel; friend class BookmarkCodec; friend class history::StarredURLDatabase; diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc index 8c1b7c2..e2f8571 100644 --- a/chrome/browser/bookmarks/bookmark_model_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "app/tree_node_model.h" #include "base/string_util.h" #include "chrome/browser/bookmarks/bookmark_codec.h" #include "chrome/browser/bookmarks/bookmark_model.h" @@ -12,7 +13,6 @@ #include "chrome/common/notification_service.h" #include "chrome/test/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" -#include "views/controls/tree/tree_node_model.h" using base::Time; using base::TimeDelta; @@ -467,7 +467,7 @@ TEST_F(BookmarkModelTest, NotifyURLsStarred) { namespace { // See comment in PopulateNodeFromString. -typedef views::TreeNodeWithValue<history::StarredEntry::Type> TestNode; +typedef TreeNodeWithValue<history::StarredEntry::Type> TestNode; // Does the work of PopulateNodeFromString. index gives the index of the current // element in description to process. diff --git a/chrome/browser/bookmarks/bookmark_utils.cc b/chrome/browser/bookmarks/bookmark_utils.cc index e21e230..8082f16 100644 --- a/chrome/browser/bookmarks/bookmark_utils.cc +++ b/chrome/browser/bookmarks/bookmark_utils.cc @@ -12,6 +12,7 @@ #else #include "chrome/common/temp_scaffolding_stubs.h" #endif +#include "app/tree_node_iterator.h" #include "base/basictypes.h" #include "base/string_util.h" #include "base/time.h" @@ -28,7 +29,6 @@ #include "chrome/common/pref_service.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" -#include "views/controls/tree/tree_node_iterator.h" #include "views/event.h" using base::Time; @@ -417,7 +417,7 @@ std::vector<BookmarkNode*> GetMostRecentlyModifiedGroups( BookmarkModel* model, size_t max_count) { std::vector<BookmarkNode*> nodes; - views::TreeNodeIterator<BookmarkNode> iterator(model->root_node()); + TreeNodeIterator<BookmarkNode> iterator(model->root_node()); while (iterator.has_next()) { BookmarkNode* parent = iterator.Next(); if (parent->is_folder() && parent->date_group_modified() > base::Time()) { @@ -455,7 +455,7 @@ std::vector<BookmarkNode*> GetMostRecentlyModifiedGroups( void GetMostRecentlyAddedEntries(BookmarkModel* model, size_t count, std::vector<BookmarkNode*>* nodes) { - views::TreeNodeIterator<BookmarkNode> iterator(model->root_node()); + TreeNodeIterator<BookmarkNode> iterator(model->root_node()); while (iterator.has_next()) { BookmarkNode* node = iterator.Next(); if (node->is_url()) { @@ -481,7 +481,7 @@ void GetBookmarksMatchingText(BookmarkModel* model, if (query_nodes.empty()) return; - views::TreeNodeIterator<BookmarkNode> iterator(model->root_node()); + TreeNodeIterator<BookmarkNode> iterator(model->root_node()); Snippet::MatchPositions match_position; while (iterator.has_next()) { BookmarkNode* node = iterator.Next(); @@ -511,7 +511,7 @@ void GetBookmarksContainingText(BookmarkModel* model, if (words.empty()) return; - views::TreeNodeIterator<BookmarkNode> iterator(model->root_node()); + TreeNodeIterator<BookmarkNode> iterator(model->root_node()); while (iterator.has_next()) { BookmarkNode* node = iterator.Next(); if (node->is_url() && DoesBookmarkContainWords(node, words)) { diff --git a/chrome/browser/history/starred_url_database.h b/chrome/browser/history/starred_url_database.h index 6b91d69..7c2925c 100644 --- a/chrome/browser/history/starred_url_database.h +++ b/chrome/browser/history/starred_url_database.h @@ -8,12 +8,12 @@ #include <map> #include <set> +#include "app/tree_node_model.h" #include "base/basictypes.h" #include "base/file_path.h" #include "chrome/browser/history/history_types.h" #include "chrome/browser/history/url_database.h" #include "testing/gtest/include/gtest/gtest_prod.h" -#include "views/controls/tree/tree_node_model.h" struct sqlite3; class SqliteStatementCache; @@ -115,7 +115,7 @@ class StarredURLDatabase : public URLDatabase { StarID CreateStarredEntry(StarredEntry* entry); // Used when checking integrity of starred table. - typedef views::TreeNodeWithValue<history::StarredEntry> StarredNode; + typedef TreeNodeWithValue<history::StarredEntry> StarredNode; // Returns the max group id, or 0 if there is an error. UIStarID GetMaxGroupID(); diff --git a/chrome/browser/views/bookmark_editor_view.cc b/chrome/browser/views/bookmark_editor_view.cc index 692f72d..0aee8bc 100644 --- a/chrome/browser/views/bookmark_editor_view.cc +++ b/chrome/browser/views/bookmark_editor_view.cc @@ -31,7 +31,6 @@ using views::GridLayout; using views::Label; using views::NativeButton; using views::TextField; -using views::TreeNode; // Background color of text field when URL is invalid. static const SkColor kErrorColor = SkColorSetRGB(0xFF, 0xBC, 0xBC); @@ -162,7 +161,7 @@ void BookmarkEditorView::OnTreeViewSelectionChanged( } bool BookmarkEditorView::CanEdit(views::TreeView* tree_view, - views::TreeModelNode* node) { + TreeModelNode* node) { // Only allow editting of children of the bookmark bar node and other node. EditorNode* bb_node = tree_model_->AsNode(node); return (bb_node->GetParent() && bb_node->GetParent()->GetParent()); diff --git a/chrome/browser/views/bookmark_editor_view.h b/chrome/browser/views/bookmark_editor_view.h index e7cba63..4ca3fde 100644 --- a/chrome/browser/views/bookmark_editor_view.h +++ b/chrome/browser/views/bookmark_editor_view.h @@ -7,12 +7,12 @@ #include <set> +#include "app/tree_node_model.h" #include "chrome/browser/bookmarks/bookmark_editor.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "views/controls/button/button.h" #include "views/controls/menu/menu.h" #include "views/controls/text_field.h" -#include "views/controls/tree/tree_node_model.h" #include "views/controls/tree/tree_view.h" #include "views/window/dialog_delegate.h" @@ -78,8 +78,7 @@ class BookmarkEditorView : public BookmarkEditor, // TreeViewObserver methods. virtual void OnTreeViewSelectionChanged(views::TreeView* tree_view); - virtual bool CanEdit(views::TreeView* tree_view, - views::TreeModelNode* node); + virtual bool CanEdit(views::TreeView* tree_view, TreeModelNode* node); // TextField::Controller methods. virtual void ContentsChanged(views::TextField* sender, @@ -113,16 +112,16 @@ class BookmarkEditorView : public BookmarkEditor, private: // Type of node in the tree. - typedef views::TreeNodeWithValue<int> EditorNode; + typedef TreeNodeWithValue<int> EditorNode; // Model for the TreeView. Trivial subclass that doesn't allow titles with // empty strings. - class EditorTreeModel : public views::TreeNodeModel<EditorNode> { + class EditorTreeModel : public TreeNodeModel<EditorNode> { public: explicit EditorTreeModel(EditorNode* root) : TreeNodeModel<EditorNode>(root) {} - virtual void SetTitle(views::TreeModelNode* node, + virtual void SetTitle(TreeModelNode* node, const std::wstring& title) { if (!title.empty()) TreeNodeModel::SetTitle(node, title); diff --git a/chrome/browser/views/bookmark_folder_tree_view.cc b/chrome/browser/views/bookmark_folder_tree_view.cc index e092670..d71071b 100644 --- a/chrome/browser/views/bookmark_folder_tree_view.cc +++ b/chrome/browser/views/bookmark_folder_tree_view.cc @@ -77,7 +77,7 @@ int BookmarkFolderTreeView::OnPerformDrop(const views::DropTargetEvent& event) { } BookmarkNode* BookmarkFolderTreeView::GetSelectedBookmarkNode() { - views::TreeModelNode* selected_node = GetSelectedNode(); + TreeModelNode* selected_node = GetSelectedNode(); if (!selected_node) return NULL; return TreeNodeAsBookmarkNode(folder_model()->AsNode(selected_node)); @@ -141,7 +141,7 @@ BookmarkFolderTreeView::DropPosition BookmarkFolderTreeView:: RECT bounds; TreeView_GetItemRect(hwnd, item, &bounds, TRUE); if (y < bounds.bottom) { - views::TreeModelNode* model_node = GetNodeForTreeItem(item); + TreeModelNode* model_node = GetNodeForTreeItem(item); if (folder_model()->GetNodeType(model_node) != BookmarkFolderTreeModel::BOOKMARK) { // Only allow drops on bookmark nodes. diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc index d635932..ed8774b 100644 --- a/chrome/browser/views/bookmark_manager_view.cc +++ b/chrome/browser/views/bookmark_manager_view.cc @@ -388,7 +388,7 @@ void BookmarkManagerView::OnKeyDown(unsigned short virtual_keycode) { void BookmarkManagerView::OnTreeViewSelectionChanged( views::TreeView* tree_view) { - views::TreeModelNode* node = tree_view_->GetSelectedNode(); + TreeModelNode* node = tree_view_->GetSelectedNode(); BookmarkTableModel* new_table_model = NULL; BookmarkNode* table_parent_node = NULL; diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 5f5bab8..3dba3a5 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -215,7 +215,7 @@ '../app/throb_animation.cc', '../app/throb_animation.h', '../app/win_util.cc', - '../app/win_util.h', + '../app/win_util.h', ], 'direct_dependent_settings': { 'include_dirs': [ @@ -1897,6 +1897,9 @@ 'app/keystone_glue.h', 'app/keystone_glue.m', 'app/scoped_ole_initializer.h', + 'app/tree_model.h', + 'app/tree_node_iterator.h', + 'app/tree_node_model.h', ], 'mac_bundle_resources': [ 'app/nibs/en.lproj/BrowserWindow.xib', @@ -2798,6 +2801,7 @@ 'common/pref_service_unittest.cc', 'common/property_bag_unittest.cc', 'common/resource_dispatcher_unittest.cc', + '../app/tree_node_iterator_unittest.cc', 'common/time_format_unittest.cc', 'common/unzip_unittest.cc', '../app/win_util_unittest.cc', @@ -2823,7 +2827,6 @@ 'test/v8_unit_test.h', '../views/controls/label_unittest.cc', '../views/controls/table/table_view_unittest.cc', - '../views/controls/tree/tree_node_iterator_unittest.cc', '../views/focus/focus_manager_unittest.cc', '../views/grid_layout_unittest.cc', '../views/view_unittest.cc', @@ -3235,9 +3238,6 @@ '../views/controls/text_field.h', '../views/controls/throbber.cc', '../views/controls/throbber.h', - '../views/controls/tree/tree_model.h', - '../views/controls/tree/tree_node_iterator.h', - '../views/controls/tree/tree_node_model.h', '../views/controls/tree/tree_view.cc', '../views/controls/tree/tree_view.h', '../views/drag_utils.cc', diff --git a/chrome/test/unit/unittests.vcproj b/chrome/test/unit/unittests.vcproj index b3fa491..025ce8b 100644 --- a/chrome/test/unit/unittests.vcproj +++ b/chrome/test/unit/unittests.vcproj @@ -1076,10 +1076,6 @@ > </File> <File - RelativePath="..\..\..\views\controls\tree\tree_node_iterator_unittest.cc" - > - </File> - <File RelativePath="..\..\..\views\view_unittest.cc" > </File> @@ -1132,6 +1128,10 @@ > </File> <File + RelativePath="..\..\..\app\tree_node_iterator_unittest.cc" + > + </File> + <File RelativePath="..\..\..\app\win_util_unittest.cc" > <FileConfiguration diff --git a/views/controls/tree/tree_view.h b/views/controls/tree/tree_view.h index 1ded058..4523916 100644 --- a/views/controls/tree/tree_view.h +++ b/views/controls/tree/tree_view.h @@ -7,10 +7,10 @@ #include <map> +#include "app/tree_model.h" #include "base/basictypes.h" #include "base/logging.h" #include "views/controls/native_control.h" -#include "views/controls/tree/tree_model.h" namespace views { diff --git a/views/views.vcproj b/views/views.vcproj index 096e269..0c336a6 100644 --- a/views/views.vcproj +++ b/views/views.vcproj @@ -716,18 +716,6 @@ Name="tree" > <File - RelativePath=".\controls\tree\tree_model.h" - > - </File> - <File - RelativePath=".\controls\tree\tree_node_iterator.h" - > - </File> - <File - RelativePath=".\controls\tree\tree_node_model.h" - > - </File> - <File RelativePath=".\controls\tree\tree_view.cc" > </File> |