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

Side by Side Diff: ui/base/models/menu_model_delegate.h

Issue 23530070: backup for dynamic recent tabs submenu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new RecentTabsMenuModelDelegate w/ new intf Created 7 years, 2 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 | « chrome/chrome_browser_ui.gypi ('k') | ui/base/models/simple_menu_model.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 UI_BASE_MODELS_MENU_MODEL_DELEGATE_H_ 5 #ifndef UI_BASE_MODELS_MENU_MODEL_DELEGATE_H_
6 #define UI_BASE_MODELS_MENU_MODEL_DELEGATE_H_ 6 #define UI_BASE_MODELS_MENU_MODEL_DELEGATE_H_
7 7
8 namespace ui { 8 namespace ui {
9 9
10 class MenuModelDelegate { 10 class MenuModelDelegate {
11 public: 11 public:
12 // Invoked when an icon has been loaded from history. 12 // Invoked when an icon has been loaded from history.
13 virtual void OnIconChanged(int index) = 0; 13 virtual void OnIconChanged(int index) = 0;
14 14
15 // Invoked prior to any calls to OnItemAdded()/OnItemRemoved().
16 virtual void PrepareForChange() {}
17
18 // Invoked when adding and removing items in MenuModel, delegate should
19 // add or remove items to or from the menu as per the model.
20 virtual void OnItemAdded(int index) {}
21 virtual void OnItemRemoved(int index) {}
22
23 // Invoked when MenuModel has finisheed the changes, delegate should finalize
24 // the menu and update the UI.
25 virtual void ChangesDone() {}
26
15 protected: 27 protected:
16 virtual ~MenuModelDelegate() {} 28 virtual ~MenuModelDelegate() {}
17 }; 29 };
18 30
19 } // namespace ui 31 } // namespace ui
20 32
21 #endif // UI_BASE_MODELS_MENU_MODEL_DELEGATE_H_ 33 #endif // UI_BASE_MODELS_MENU_MODEL_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | ui/base/models/simple_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698