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

Side by Side Diff: chrome/browser/translate/chrome_translate_client.h

Issue 2396783002: Add LanguageModel, a keyed service that collects language info from CLD. (Closed)
Patch Set: Created 4 years, 2 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_CHROME_TRANSLATE_CLIENT_H_ 5 #ifndef CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_
6 #define CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_ 6 #define CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chrome/browser/ui/translate/translate_bubble_model.h" 12 #include "chrome/browser/ui/translate/translate_bubble_model.h"
13 #include "components/translate/content/browser/content_translate_driver.h" 13 #include "components/translate/content/browser/content_translate_driver.h"
14 #include "components/translate/content/browser/language_model_observer.h"
14 #include "components/translate/core/browser/translate_client.h" 15 #include "components/translate/core/browser/translate_client.h"
15 #include "components/translate/core/browser/translate_step.h" 16 #include "components/translate/core/browser/translate_step.h"
16 #include "components/translate/core/common/translate_errors.h" 17 #include "components/translate/core/common/translate_errors.h"
17 #include "content/public/browser/web_contents_observer.h" 18 #include "content/public/browser/web_contents_observer.h"
18 #include "content/public/browser/web_contents_user_data.h" 19 #include "content/public/browser/web_contents_user_data.h"
19 20
20 namespace content { 21 namespace content {
21 class BrowserContext; 22 class BrowserContext;
22 class WebContents; 23 class WebContents;
23 } // namespace content 24 } // namespace content
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 friend class content::WebContentsUserData<ChromeTranslateClient>; 114 friend class content::WebContentsUserData<ChromeTranslateClient>;
114 115
115 // content::WebContentsObserver implementation. 116 // content::WebContentsObserver implementation.
116 void WebContentsDestroyed() override; 117 void WebContentsDestroyed() override;
117 118
118 // Shows the translate bubble. 119 // Shows the translate bubble.
119 void ShowBubble(translate::TranslateStep step, 120 void ShowBubble(translate::TranslateStep step,
120 translate::TranslateErrors::Type error_type); 121 translate::TranslateErrors::Type error_type);
121 122
122 translate::ContentTranslateDriver translate_driver_; 123 translate::ContentTranslateDriver translate_driver_;
124 translate::LanguageModelObserver language_model_observer_;
123 std::unique_ptr<translate::TranslateManager> translate_manager_; 125 std::unique_ptr<translate::TranslateManager> translate_manager_;
124 126
125 DISALLOW_COPY_AND_ASSIGN(ChromeTranslateClient); 127 DISALLOW_COPY_AND_ASSIGN(ChromeTranslateClient);
126 }; 128 };
127 129
128 #endif // CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_ 130 #endif // CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698