Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / translate / chrome_translate_delegate.h
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 CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_DELEGATE_H_
6 #define CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_DELEGATE_H_
7
8 #include "components/translate/core/browser/translate_delegate.h"
9
10 #include <string>
11
12 #include "base/compiler_specific.h"
13
14 template <typename T>
15 struct DefaultSingletonTraits;
16
17 namespace net {
18 class URLRequestContextGetter;
19 }
20
21 // Chrome embedder for the translate component.
22 class ChromeTranslateDelegate : public TranslateDelegate {
23  public:
24   // Returns the singleton instance.
25   // TODO(droger): Improve the ownership model. See http://crbug.com/332736.
26   static ChromeTranslateDelegate* GetInstance();
27
28   virtual ~ChromeTranslateDelegate();
29
30  private:
31   friend struct DefaultSingletonTraits<ChromeTranslateDelegate>;
32   ChromeTranslateDelegate();
33
34   // TranslateDelegate methods.
35   virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE;
36 };
37
38 #endif  // CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_DELEGATE_H_