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

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

Issue 1543533002: Restore non-static CLD data functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/translate/chrome_translate_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.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/browser_cld_data_provider.h"
14 #include "components/translate/content/browser/content_translate_driver.h" 13 #include "components/translate/content/browser/content_translate_driver.h"
15 #include "components/translate/core/browser/translate_client.h" 14 #include "components/translate/core/browser/translate_client.h"
16 #include "components/translate/core/browser/translate_step.h" 15 #include "components/translate/core/browser/translate_step.h"
17 #include "components/translate/core/common/translate_errors.h" 16 #include "components/translate/core/common/translate_errors.h"
18 #include "content/public/browser/web_contents_observer.h" 17 #include "content/public/browser/web_contents_observer.h"
19 #include "content/public/browser/web_contents_user_data.h" 18 #include "content/public/browser/web_contents_user_data.h"
20 19
21 namespace content { 20 namespace content {
22 class BrowserContext; 21 class BrowserContext;
23 class WebContents; 22 class WebContents;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const translate::LanguageDetectionDetails& details) override; 101 const translate::LanguageDetectionDetails& details) override;
103 void OnPageTranslated(const std::string& original_lang, 102 void OnPageTranslated(const std::string& original_lang,
104 const std::string& translated_lang, 103 const std::string& translated_lang,
105 translate::TranslateErrors::Type error_type) override; 104 translate::TranslateErrors::Type error_type) override;
106 105
107 private: 106 private:
108 explicit ChromeTranslateClient(content::WebContents* web_contents); 107 explicit ChromeTranslateClient(content::WebContents* web_contents);
109 friend class content::WebContentsUserData<ChromeTranslateClient>; 108 friend class content::WebContentsUserData<ChromeTranslateClient>;
110 109
111 // content::WebContentsObserver implementation. 110 // content::WebContentsObserver implementation.
112 bool OnMessageReceived(const IPC::Message& message) override;
113 void WebContentsDestroyed() override; 111 void WebContentsDestroyed() override;
114 112
115 // Shows the translate bubble. 113 // Shows the translate bubble.
116 void ShowBubble(translate::TranslateStep step, 114 void ShowBubble(translate::TranslateStep step,
117 translate::TranslateErrors::Type error_type); 115 translate::TranslateErrors::Type error_type);
118 116
119 translate::ContentTranslateDriver translate_driver_; 117 translate::ContentTranslateDriver translate_driver_;
120 scoped_ptr<translate::TranslateManager> translate_manager_; 118 scoped_ptr<translate::TranslateManager> translate_manager_;
121 119
122 // Provides CLD data for this process.
123 scoped_ptr<translate::BrowserCldDataProvider> cld_data_provider_;
124
125 DISALLOW_COPY_AND_ASSIGN(ChromeTranslateClient); 120 DISALLOW_COPY_AND_ASSIGN(ChromeTranslateClient);
126 }; 121 };
127 122
128 #endif // CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_ 123 #endif // CHROME_BROWSER_TRANSLATE_CHROME_TRANSLATE_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/translate/chrome_translate_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698