summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-13 18:54:20 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-13 18:54:20 +0000
commit992c625bf2d6dfaaa46cf5b45cdcd7de68e7817e (patch)
treeae6467a99cf17115e04af5bbe358a6219f9c9808 /chrome/browser/views
parentb83fed38db16e462afa3051dcad21318c62b2357 (diff)
downloadchromium_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
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/bookmark_editor_view.cc3
-rw-r--r--chrome/browser/views/bookmark_editor_view.h11
-rw-r--r--chrome/browser/views/bookmark_folder_tree_view.cc4
-rw-r--r--chrome/browser/views/bookmark_manager_view.cc2
4 files changed, 9 insertions, 11 deletions
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;