summaryrefslogtreecommitdiffstats
path: root/chrome/browser/translate/translate_infobars_delegates.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/translate/translate_infobars_delegates.h')
-rw-r--r--chrome/browser/translate/translate_infobars_delegates.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/translate/translate_infobars_delegates.h b/chrome/browser/translate/translate_infobars_delegates.h
index 311b847..ceeda17 100644
--- a/chrome/browser/translate/translate_infobars_delegates.h
+++ b/chrome/browser/translate/translate_infobars_delegates.h
@@ -60,6 +60,21 @@ class TranslateInfoBarDelegate : public InfoBarDelegate {
return state_;
}
+ // Retrieve the text for the toolbar label. The toolbar label is a bit
+ // strange since we need to place popup menus inside the string in question.
+ // To do this we use two placeholders.
+ //
+ // |message_text| is the text to display for the label.
+ // |offsets| contains the offsets of the number of placeholders in the text
+ // + message_text->length() i.e. it can contain 2 or 3 elements.
+ // offsets[0] < offsets[1] even in cases where the languages need to be
+ // displayed in reverse order.
+ // |swapped_language_placeholders| is true if we need to flip the order
+ // of the menus in the current locale.
+ void GetMessageText(string16 *message_text,
+ std::vector<size_t> *offsets,
+ bool *swapped_language_placeholders);
+
// Overridden from InfoBarDelegate.
virtual Type GetInfoBarType() {
return PAGE_ACTION_TYPE;