cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / ios / chrome / browser / translate / translate_service_ios.h
blob2b98086caa142b131f5a0f4f34d1a10b27857128
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
3 // found in the LICENSE file.
5 #ifndef IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_IOS_H_
6 #define IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_IOS_H_
8 #include "base/macros.h"
9 #include "components/web_resource/resource_request_allowed_notifier.h"
11 class GURL;
13 // Singleton managing the resources required for Translate.
14 class TranslateServiceIOS
15 : public web_resource::ResourceRequestAllowedNotifier::Observer {
16 public:
17 // Must be called before the Translate feature can be used.
18 static void Initialize();
20 // Must be called to shut down the Translate feature.
21 static void Shutdown();
23 // Returns true if the URL can be translated.
24 static bool IsTranslatableURL(const GURL& url);
26 private:
27 TranslateServiceIOS();
28 ~TranslateServiceIOS();
30 // ResourceRequestAllowedNotifier::Observer methods.
31 void OnResourceRequestsAllowed() override;
33 // Helper class to know if it's allowed to make network resource requests.
34 web_resource::ResourceRequestAllowedNotifier
35 resource_request_allowed_notifier_;
37 DISALLOW_COPY_AND_ASSIGN(TranslateServiceIOS);
40 #endif // IOS_CHROME_BROWSER_TRANSLATE_TRANSLATE_SERVICE_IOS_H_