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

Unified Diff: chrome/browser/translate/translate_service.h

Issue 143003020: Move TranslateLanguageList to the Translate component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@removeDelegate
Patch Set: rebase Created 6 years, 11 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
« no previous file with comments | « chrome/browser/translate/translate_script.cc ('k') | chrome/browser/translate/translate_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_service.h
diff --git a/chrome/browser/translate/translate_service.h b/chrome/browser/translate/translate_service.h
index f98989672cba78f6933a49346cdae98aadfef358..96a353a7491be31d4cd05ec5dba530b45cad8354 100644
--- a/chrome/browser/translate/translate_service.h
+++ b/chrome/browser/translate/translate_service.h
@@ -5,15 +5,26 @@
#ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_
#define CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_
+#include "chrome/browser/web_resource/resource_request_allowed_notifier.h"
+
// Singleton managing the resources required for Translate.
-class TranslateService {
+class TranslateService : public ResourceRequestAllowedNotifier::Observer {
public:
-
// Must be called before the Translate feature can be used.
static void Initialize();
// Must be called to shut down the Translate feature.
static void Shutdown(bool cleanup_pending_fetcher);
+
+ private:
+ TranslateService();
+ ~TranslateService();
+
+ // ResourceRequestAllowedNotifier::Observer methods.
+ virtual void OnResourceRequestsAllowed() OVERRIDE;
+
+ // Helper class to know if it's allowed to make network resource requests.
+ ResourceRequestAllowedNotifier resource_request_allowed_notifier_;
};
#endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_
« no previous file with comments | « chrome/browser/translate/translate_script.cc ('k') | chrome/browser/translate/translate_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698