Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1299)

Unified Diff: components/translate/core/browser/translate_driver.h

Issue 228483003: Remove most content-level dependencies from TranslateManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698