diff options
| author | Ben Murdoch <benm@google.com> | 2010-11-18 18:32:45 +0000 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2010-11-18 18:38:07 +0000 |
| commit | 513209b27ff55e2841eac0e4120199c23acce758 (patch) | |
| tree | aeba30bb08c5f47c57003544e378a377c297eee6 /chrome/browser/chromeos/dom_ui/menu_ui.h | |
| parent | 164f7496de0fbee436b385a79ead9e3cb81a50c1 (diff) | |
| download | external_chromium-513209b27ff55e2841eac0e4120199c23acce758.zip external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.gz external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.bz2 | |
Merge Chromium at r65505: Initial merge by git.
Change-Id: I31d8f1d8cd33caaf7f47ffa7350aef42d5fbdb45
Diffstat (limited to 'chrome/browser/chromeos/dom_ui/menu_ui.h')
| -rw-r--r-- | chrome/browser/chromeos/dom_ui/menu_ui.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/chrome/browser/chromeos/dom_ui/menu_ui.h b/chrome/browser/chromeos/dom_ui/menu_ui.h index 151c324..9f8c5db 100644 --- a/chrome/browser/chromeos/dom_ui/menu_ui.h +++ b/chrome/browser/chromeos/dom_ui/menu_ui.h @@ -21,6 +21,20 @@ namespace chromeos { class DOMUIMenuControl; +// MenuSourceDelegate class allows subclass to injects specific values +// to menu javascript code. +class MenuSourceDelegate { + public: + virtual ~MenuSourceDelegate() {} + // Subclass can add extra parameters or replaces default configuration. + virtual void AddCustomConfigValues(DictionaryValue* config) const {}; + + // Subclass can add their values to |localized_strings| and those values + // are used by JS template builder and could be accessed via JS class + // LocalStrings. + virtual void AddLocalizedStrings(DictionaryValue* localized_strings) const {} +}; + class MenuUI : public DOMUI { public: explicit MenuUI(TabContents* contents); @@ -36,21 +50,11 @@ class MenuUI : public DOMUI { int* max_icon_width, bool* has_accel) const; - // Subclass can add extra parameters or replaces default configuration. - virtual void AddCustomConfigValues(DictionaryValue* config) const {}; - - // Subclass can add their values to |localized_strings| and those values - // are used by JS template builder and could be accessed via JS class - // LocalStrings. - virtual void AddLocalizedStrings(DictionaryValue* localized_strings) const {}; - // A utility function which creates a concrete html file from // template file |menu_resource_id| and |menu_css_id| for given |menu_class|. // The resource_name is the host part of DOMUI's url. - // Caution: This calls MenuUI::GetProfile() when creating the data source, - // thus, it has to be initialized. static ChromeURLDataManager::DataSource* CreateMenuUIHTMLSource( - const MenuUI& menu_ui, + const MenuSourceDelegate* delegate, const std::string& source_name, const std::string& menu_class, int menu_source_res_id, |
