Index: components/translate/core/browser/translate_driver.h |
diff --git a/components/translate/core/browser/translate_driver.h b/components/translate/core/browser/translate_driver.h |
index f5a163f462febdc69ca207a8f5708fded72d221e..88bb50385390f036d535a59f401769372c493095 100644 |
--- a/components/translate/core/browser/translate_driver.h |
+++ b/components/translate/core/browser/translate_driver.h |
@@ -7,6 +7,7 @@ |
#include <string> |
+class GURL; |
class LanguageState; |
// Interface that allows Translate core code to interact with its driver (i.e., |
@@ -36,6 +37,26 @@ class TranslateDriver { |
// Returns whether the user is currently operating in off-the-record mode. |
virtual bool IsOffTheRecord() = 0; |
+ |
+ // Returns the mime type of the current page. |
+ virtual const std::string& GetContentsMimeType() = 0; |
+ |
+ // Returns the last committed URL, or an empty GURL if there is no committed |
+ // URL. |
+ virtual const GURL& GetLastCommittedURL() = 0; |
+ |
+ // Returns the active URL, or an empty GURL if there is no active URL. |
+ virtual const GURL& GetActiveURL() = 0; |
+ |
+ // Returns the visible URL, or an empty GURL if there is no visible URL. |
+ virtual const GURL& GetVisibleURL() = 0; |
+ |
+ // Returns whether the driver has access to the current page. |
+ virtual bool HasCurrentPage() = 0; |
+ |
+ // Returns an int identifying the current page. Should only be called if |
+ // |HasCurrentPage()| is true. |
+ virtual int GetCurrentPageID() = 0; |
}; |
#endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_DRIVER_H_ |