summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/translate_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/translate_helper.h')
-rw-r--r--chrome/renderer/translate_helper.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/renderer/translate_helper.h b/chrome/renderer/translate_helper.h
index bec9e02..0e3a989 100644
--- a/chrome/renderer/translate_helper.h
+++ b/chrome/renderer/translate_helper.h
@@ -13,6 +13,7 @@
class RenderView;
namespace WebKit {
+class WebDocument;
class WebFrame;
}
@@ -39,6 +40,18 @@ class TranslateHelper {
// revert existing translations.
void CancelPendingTranslation();
+ // Returns whether the page associated with |document| is a candidate for
+ // translation. Some pages can explictly specify (via a meta-tag) that they
+ // should not be translated.
+ static bool IsPageTranslatable(WebKit::WebDocument* document);
+
+ // Returns the language specified in the language meta tag of |document|, or
+ // an empty string if no such tag was found.
+ // The tag may specify several languages, the first one is returned.
+ // Example of such meta-tag:
+ // <meta http-equiv="content-language" content="en, fr">
+ static std::string GetPageLanguageFromMetaTag(WebKit::WebDocument* document);
+
protected:
// The following methods are protected so they can be overridden in
// unit-tests.