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.
4 
5 #ifndef COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_
6 #define COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_
7 
8 #include "base/feature_list.h"
9 #include "url/gurl.h"
10 
11 namespace translate {
12 
13 // Controls whether translation applies to sub frames as well as the
14 // main frame.
15 extern const base::Feature kTranslateSubFrames;
16 
17 // Isolated world sets following security-origin by default.
18 extern const char kSecurityOrigin[];
19 
20 // Gets Security origin with which Translate runs. This is used both for
21 // language checks and to obtain the list of available languages.
22 GURL GetTranslateSecurityOrigin();
23 
24 // Return whether sub frame translation is enabled.
25 bool IsSubFrameTranslationEnabled();
26 
27 // Return whether sub frame language detection is enabled.
28 bool IsSubFrameLanguageDetectionEnabled();
29 
30 }  // namespace translate
31 
32 #endif  // COMPONENTS_TRANSLATE_CORE_COMMON_TRANSLATE_UTIL_H_
33