Index: components/translate/content/renderer/translate_helper.h |
diff --git a/components/translate/content/renderer/translate_helper.h b/components/translate/content/renderer/translate_helper.h |
index 622e7183fc6e8c11a6ab71b4fd263b0f8523f749..4a2da92f337e88110df62715b3ae481bd91af13f 100644 |
--- a/components/translate/content/renderer/translate_helper.h |
+++ b/components/translate/content/renderer/translate_helper.h |
@@ -98,6 +98,12 @@ class TranslateHelper : public content::RenderFrameObserver, |
// run successfully. Otherwise, returns 0.0. |
virtual double ExecuteScriptAndGetDoubleResult(const std::string& script); |
+ // Executes the JavaScript code in |script| in the main frame of RenderView. |
+ // and returns the integer value returned by the script evaluation if the |
+ // script was run successfully. Otherwise, returns |fallback| value. |
+ virtual int64_t ExecuteScriptAndGetIntegerResult(const std::string& script, |
+ int64_t fallback); |
+ |
private: |
// Converts language code to the one used in server supporting list. |
static void ConvertLanguageCodeSynonym(std::string* code); |