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

Side by Side Diff: chrome/browser/bookmarks/bookmark_context_menu.h

Issue 115831: Converts a bunch things from NativeWindow to NativeView to make it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_context_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 BOOKMARK_MANAGER_ORGANIZE_MENU_OTHER 48 BOOKMARK_MANAGER_ORGANIZE_MENU_OTHER
49 }; 49 };
50 50
51 // Creates the bookmark context menu. 51 // Creates the bookmark context menu.
52 // |profile| is used for opening urls as well as enabling 'open incognito'. 52 // |profile| is used for opening urls as well as enabling 'open incognito'.
53 // |browser| is used to determine the PageNavigator and may be null. 53 // |browser| is used to determine the PageNavigator and may be null.
54 // |navigator| is used if |browser| is null, and is provided for testing. 54 // |navigator| is used if |browser| is null, and is provided for testing.
55 // |parent| is the parent for newly created nodes if |selection| is empty. 55 // |parent| is the parent for newly created nodes if |selection| is empty.
56 // |selection| is the nodes the context menu operates on and may be empty. 56 // |selection| is the nodes the context menu operates on and may be empty.
57 // |configuration| determines which items to show. 57 // |configuration| determines which items to show.
58 BookmarkContextMenu(gfx::NativeWindow hwnd, 58 BookmarkContextMenu(gfx::NativeView hwnd,
59 Profile* profile, 59 Profile* profile,
60 Browser* browser, 60 Browser* browser,
61 PageNavigator* navigator, 61 PageNavigator* navigator,
62 BookmarkNode* parent, 62 BookmarkNode* parent,
63 const std::vector<BookmarkNode*>& selection, 63 const std::vector<BookmarkNode*>& selection,
64 ConfigurationType configuration); 64 ConfigurationType configuration);
65 virtual ~BookmarkContextMenu(); 65 virtual ~BookmarkContextMenu();
66 66
67 #if defined(TOOLKIT_VIEWS) 67 #if defined(TOOLKIT_VIEWS)
68 // Shows the menu at the specified place. 68 // Shows the menu at the specified place.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 BookmarkModel* RemoveModelObserver(); 123 BookmarkModel* RemoveModelObserver();
124 124
125 // Returns true if selection_ has at least one bookmark of type url. 125 // Returns true if selection_ has at least one bookmark of type url.
126 bool HasURLs() const; 126 bool HasURLs() const;
127 127
128 // Returns the parent for newly created folders/bookmarks. If selection_ 128 // Returns the parent for newly created folders/bookmarks. If selection_
129 // has one element and it is a folder, selection_[0] is returned, otherwise 129 // has one element and it is a folder, selection_[0] is returned, otherwise
130 // parent_ is returned. 130 // parent_ is returned.
131 BookmarkNode* GetParentForNewNodes() const; 131 BookmarkNode* GetParentForNewNodes() const;
132 132
133 gfx::NativeWindow wnd_; 133 gfx::NativeView wnd_;
134 Profile* profile_; 134 Profile* profile_;
135 Browser* browser_; 135 Browser* browser_;
136 PageNavigator* navigator_; 136 PageNavigator* navigator_;
137 BookmarkNode* parent_; 137 BookmarkNode* parent_;
138 std::vector<BookmarkNode*> selection_; 138 std::vector<BookmarkNode*> selection_;
139 BookmarkModel* model_; 139 BookmarkModel* model_;
140 ConfigurationType configuration_; 140 ConfigurationType configuration_;
141 141
142 #if defined(OS_WIN) || defined(TOOLKIT_VIEWS) 142 #if defined(OS_WIN) || defined(TOOLKIT_VIEWS)
143 scoped_ptr<views::MenuItemView> menu_; 143 scoped_ptr<views::MenuItemView> menu_;
144 #elif defined(OS_LINUX) 144 #elif defined(OS_LINUX)
145 scoped_ptr<MenuGtk> menu_; 145 scoped_ptr<MenuGtk> menu_;
146 #endif 146 #endif
147 147
148 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenu); 148 DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenu);
149 }; 149 };
150 150
151 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_ 151 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_CONTEXT_MENU_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698