| 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 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ |
| 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 BookmarkNode* parent, | 82 BookmarkNode* parent, |
| 83 int index); | 83 int index); |
| 84 virtual void BookmarkNodeRemoved(BookmarkModel* model, | 84 virtual void BookmarkNodeRemoved(BookmarkModel* model, |
| 85 BookmarkNode* parent, | 85 BookmarkNode* parent, |
| 86 int index, | 86 int index, |
| 87 BookmarkNode* node); | 87 BookmarkNode* node); |
| 88 virtual void BookmarkNodeChanged(BookmarkModel* model, | 88 virtual void BookmarkNodeChanged(BookmarkModel* model, |
| 89 BookmarkNode* node); | 89 BookmarkNode* node); |
| 90 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, | 90 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, |
| 91 BookmarkNode* node) {} | 91 BookmarkNode* node) {} |
| 92 virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, |
| 93 BookmarkNode* node); |
| 92 | 94 |
| 93 // Invoked from the various bookmark model observer methods. Closes the menu. | 95 // Invoked from the various bookmark model observer methods. Closes the menu. |
| 94 void ModelChanged(); | 96 void ModelChanged(); |
| 95 | 97 |
| 96 // Removes the observer from the model and NULLs out model_. | 98 // Removes the observer from the model and NULLs out model_. |
| 97 BookmarkModel* RemoveModelObserver(); | 99 BookmarkModel* RemoveModelObserver(); |
| 98 | 100 |
| 99 // Returns true if selection_ has at least one bookmark of type url. | 101 // Returns true if selection_ has at least one bookmark of type url. |
| 100 bool HasURLs() const; | 102 bool HasURLs() const; |
| 101 | 103 |
| 102 // Returns the parent for newly created folders/bookmarks. If selection_ | 104 // Returns the parent for newly created folders/bookmarks. If selection_ |
| 103 // has one element and it is a folder, selection_[0] is returned, otherwise | 105 // has one element and it is a folder, selection_[0] is returned, otherwise |
| 104 // parent_ is returned. | 106 // parent_ is returned. |
| 105 BookmarkNode* GetParentForNewNodes() const; | 107 BookmarkNode* GetParentForNewNodes() const; |
| 106 | 108 |
| 107 gfx::NativeWindow wnd_; | 109 gfx::NativeWindow wnd_; |
| 108 Profile* profile_; | 110 Profile* profile_; |
| 109 Browser* browser_; | 111 Browser* browser_; |
| 110 PageNavigator* navigator_; | 112 PageNavigator* navigator_; |
| 111 BookmarkNode* parent_; | 113 BookmarkNode* parent_; |
| 112 std::vector<BookmarkNode*> selection_; | 114 std::vector<BookmarkNode*> selection_; |
| 113 scoped_ptr<views::MenuItemView> menu_; | 115 scoped_ptr<views::MenuItemView> menu_; |
| 114 BookmarkModel* model_; | 116 BookmarkModel* model_; |
| 115 ConfigurationType configuration_; | 117 ConfigurationType configuration_; |
| 116 | 118 |
| 117 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenu); | 119 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenu); |
| 118 }; | 120 }; |
| 119 | 121 |
| 120 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ | 122 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ |
| OLD | NEW |