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

Side by Side Diff: chrome/browser/dom_ui/new_tab_ui.h

Issue 1912: Renames BoomarkBarModel to BookmarkModel. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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
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_DOM_UI_NEW_TAB_UI_H__ 5 #ifndef CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__
6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__ 6 #define CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__
jcampan 2008/09/10 23:01:24 Since you were changing the double __ to a single
7 7
8 #include "chrome/browser/bookmarks/bookmark_bar_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/browser/dom_ui/dom_ui_host.h" 9 #include "chrome/browser/dom_ui/dom_ui_host.h"
10 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" 10 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
11 #include "chrome/browser/history/history.h" 11 #include "chrome/browser/history/history.h"
12 #include "chrome/browser/tab_restore_service.h" 12 #include "chrome/browser/tab_restore_service.h"
13 #include "chrome/browser/template_url_model.h" 13 #include "chrome/browser/template_url_model.h"
14 14
15 class GURL; 15 class GURL;
16 class Profile; 16 class Profile;
17 class Value; 17 class Value;
18 enum TabContentsType; 18 enum TabContentsType;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 virtual void OnTemplateURLModelChanged(); 172 virtual void OnTemplateURLModelChanged();
173 173
174 private: 174 private:
175 DOMUIHost* dom_ui_host_; 175 DOMUIHost* dom_ui_host_;
176 TemplateURLModel* template_url_model_; // Owned by profile. 176 TemplateURLModel* template_url_model_; // Owned by profile.
177 177
178 DISALLOW_EVIL_CONSTRUCTORS(TemplateURLHandler); 178 DISALLOW_EVIL_CONSTRUCTORS(TemplateURLHandler);
179 }; 179 };
180 180
181 class RecentlyBookmarkedHandler : public DOMMessageHandler, 181 class RecentlyBookmarkedHandler : public DOMMessageHandler,
182 public BookmarkBarModelObserver { 182 public BookmarkModelObserver {
183 public: 183 public:
184 explicit RecentlyBookmarkedHandler(DOMUIHost* dom_ui_host); 184 explicit RecentlyBookmarkedHandler(DOMUIHost* dom_ui_host);
185 ~RecentlyBookmarkedHandler(); 185 ~RecentlyBookmarkedHandler();
186 186
187 // Callback which navigates to the bookmarks page. 187 // Callback which navigates to the bookmarks page.
188 void HandleShowBookmarkPage(const Value*); 188 void HandleShowBookmarkPage(const Value*);
189 189
190 // Callback for the "getRecentlyBookmarked" message. 190 // Callback for the "getRecentlyBookmarked" message.
191 // It takes no arguments. 191 // It takes no arguments.
192 void HandleGetRecentlyBookmarked(const Value*); 192 void HandleGetRecentlyBookmarked(const Value*);
193 193
194 private: 194 private:
195 void SendBookmarksToPage(); 195 void SendBookmarksToPage();
196 196
197 // BookmarkBarModelObserver methods. These invoke SendBookmarksToPage. 197 // BookmarkModelObserver methods. These invoke SendBookmarksToPage.
198 virtual void Loaded(BookmarkBarModel* model); 198 virtual void Loaded(BookmarkModel* model);
199 virtual void BookmarkNodeAdded(BookmarkBarModel* model, 199 virtual void BookmarkNodeAdded(BookmarkModel* model,
200 BookmarkBarNode* parent, 200 BookmarkNode* parent,
201 int index); 201 int index);
202 virtual void BookmarkNodeRemoved(BookmarkBarModel* model, 202 virtual void BookmarkNodeRemoved(BookmarkModel* model,
203 BookmarkBarNode* parent, 203 BookmarkNode* parent,
204 int index); 204 int index);
205 virtual void BookmarkNodeChanged(BookmarkBarModel* model, 205 virtual void BookmarkNodeChanged(BookmarkModel* model,
206 BookmarkBarNode* node); 206 BookmarkNode* node);
207 207
208 // These two won't effect what is shown, so they do nothing. 208 // These two won't effect what is shown, so they do nothing.
209 virtual void BookmarkNodeMoved(BookmarkBarModel* model, 209 virtual void BookmarkNodeMoved(BookmarkModel* model,
210 BookmarkBarNode* old_parent, 210 BookmarkNode* old_parent,
211 int old_index, 211 int old_index,
212 BookmarkBarNode* new_parent, 212 BookmarkNode* new_parent,
213 int new_index) {} 213 int new_index) {}
214 virtual void BookmarkNodeFavIconLoaded(BookmarkBarModel* model, 214 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model,
215 BookmarkBarNode* node) {} 215 BookmarkNode* node) {}
216 216
217 DOMUIHost* dom_ui_host_; 217 DOMUIHost* dom_ui_host_;
218 // The model we're getting bookmarks from. The model is owned by the Profile. 218 // The model we're getting bookmarks from. The model is owned by the Profile.
219 BookmarkBarModel* model_; 219 BookmarkModel* model_;
220 220
221 DISALLOW_EVIL_CONSTRUCTORS(RecentlyBookmarkedHandler); 221 DISALLOW_EVIL_CONSTRUCTORS(RecentlyBookmarkedHandler);
222 }; 222 };
223 223
224 class RecentlyClosedTabsHandler : public DOMMessageHandler, 224 class RecentlyClosedTabsHandler : public DOMMessageHandler,
225 public TabRestoreService::Observer { 225 public TabRestoreService::Observer {
226 public: 226 public:
227 explicit RecentlyClosedTabsHandler(DOMUIHost* dom_ui_host); 227 explicit RecentlyClosedTabsHandler(DOMUIHost* dom_ui_host);
228 virtual ~RecentlyClosedTabsHandler(); 228 virtual ~RecentlyClosedTabsHandler();
229 229
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 // A pointer to the handler for most visited. 321 // A pointer to the handler for most visited.
322 // Owned by the DOMUIHost. 322 // Owned by the DOMUIHost.
323 MostVisitedHandler* most_visited_handler_; 323 MostVisitedHandler* most_visited_handler_;
324 324
325 DISALLOW_EVIL_CONSTRUCTORS(NewTabUIContents); 325 DISALLOW_EVIL_CONSTRUCTORS(NewTabUIContents);
326 }; 326 };
327 327
328 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__ 328 #endif // CHROME_BROWSER_DOM_UI_NEW_TAB_UI_H__
329 329
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698