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

Side by Side 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, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_ 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_
7 7
8 #include "chrome/browser/web_resource/resource_request_allowed_notifier.h"
9
8 // Singleton managing the resources required for Translate. 10 // Singleton managing the resources required for Translate.
9 class TranslateService { 11 class TranslateService : public ResourceRequestAllowedNotifier::Observer {
10 public: 12 public:
11
12 // Must be called before the Translate feature can be used. 13 // Must be called before the Translate feature can be used.
13 static void Initialize(); 14 static void Initialize();
14 15
15 // Must be called to shut down the Translate feature. 16 // Must be called to shut down the Translate feature.
16 static void Shutdown(bool cleanup_pending_fetcher); 17 static void Shutdown(bool cleanup_pending_fetcher);
18
19 private:
20 TranslateService();
21 ~TranslateService();
22
23 // ResourceRequestAllowedNotifier::Observer methods.
24 virtual void OnResourceRequestsAllowed() OVERRIDE;
25
26 // Helper class to know if it's allowed to make network resource requests.
27 ResourceRequestAllowedNotifier resource_request_allowed_notifier_;
17 }; 28 };
18 29
19 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_ 30 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_H_
OLDNEW
« 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