Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_view.h

Issue 791623004: bookmarks: Move BookmarkModelObserver into 'bookmarks' namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + sync + cocoa fixes Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_EDITOR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_EDITOR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_EDITOR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_EDITOR_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // 44 //
45 // To use BookmarkEditorView invoke the static show method. 45 // To use BookmarkEditorView invoke the static show method.
46 46
47 class BookmarkEditorView : public BookmarkEditor, 47 class BookmarkEditorView : public BookmarkEditor,
48 public views::ButtonListener, 48 public views::ButtonListener,
49 public views::TreeViewController, 49 public views::TreeViewController,
50 public views::DialogDelegateView, 50 public views::DialogDelegateView,
51 public views::TextfieldController, 51 public views::TextfieldController,
52 public views::ContextMenuController, 52 public views::ContextMenuController,
53 public ui::SimpleMenuModel::Delegate, 53 public ui::SimpleMenuModel::Delegate,
54 public BookmarkModelObserver { 54 public bookmarks::BookmarkModelObserver {
55 public: 55 public:
56 // Type of node in the tree. Public purely for testing. 56 // Type of node in the tree. Public purely for testing.
57 typedef ui::TreeNodeWithValue<int64> EditorNode; 57 typedef ui::TreeNodeWithValue<int64> EditorNode;
58 58
59 // Model for the TreeView. Trivial subclass that doesn't allow titles with 59 // Model for the TreeView. Trivial subclass that doesn't allow titles with
60 // empty strings. Public purely for testing. 60 // empty strings. Public purely for testing.
61 class EditorTreeModel : public ui::TreeNodeModel<EditorNode> { 61 class EditorTreeModel : public ui::TreeNodeModel<EditorNode> {
62 public: 62 public:
63 explicit EditorTreeModel(EditorNode* root) 63 explicit EditorTreeModel(EditorNode* root)
64 : ui::TreeNodeModel<EditorNode>(root) {} 64 : ui::TreeNodeModel<EditorNode>(root) {}
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 const gfx::Point& point, 119 const gfx::Point& point,
120 ui::MenuSourceType source_type) override; 120 ui::MenuSourceType source_type) override;
121 121
122 private: 122 private:
123 friend class BookmarkEditorViewTest; 123 friend class BookmarkEditorViewTest;
124 124
125 // Creates the necessary sub-views, configures them, adds them to the layout, 125 // Creates the necessary sub-views, configures them, adds them to the layout,
126 // and requests the entries to display from the database. 126 // and requests the entries to display from the database.
127 void Init(); 127 void Init();
128 128
129 // BookmarkModel observer methods. Any structural change results in 129 // bookmarks::BookmarkModelObserver:
130 // resetting the tree model. 130 // Any structural change results in resetting the tree model.
131 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override { 131 void BookmarkModelLoaded(BookmarkModel* model, bool ids_reassigned) override {
132 } 132 }
133 void BookmarkNodeMoved(BookmarkModel* model, 133 void BookmarkNodeMoved(BookmarkModel* model,
134 const BookmarkNode* old_parent, 134 const BookmarkNode* old_parent,
135 int old_index, 135 int old_index,
136 const BookmarkNode* new_parent, 136 const BookmarkNode* new_parent,
137 int new_index) override; 137 int new_index) override;
138 void BookmarkNodeAdded(BookmarkModel* model, 138 void BookmarkNodeAdded(BookmarkModel* model,
139 const BookmarkNode* parent, 139 const BookmarkNode* parent,
140 int index) override; 140 int index) override;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Is the tree shown? 262 // Is the tree shown?
263 bool show_tree_; 263 bool show_tree_;
264 264
265 // List of deleted bookmark folders. 265 // List of deleted bookmark folders.
266 std::vector<int64> deletes_; 266 std::vector<int64> deletes_;
267 267
268 DISALLOW_COPY_AND_ASSIGN(BookmarkEditorView); 268 DISALLOW_COPY_AND_ASSIGN(BookmarkEditorView);
269 }; 269 };
270 270
271 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_EDITOR_VIEW_H_ 271 #endif // CHROME_BROWSER_UI_VIEWS_BOOKMARKS_BOOKMARK_EDITOR_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ('k') | components/bookmarks/browser/bookmark_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698