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

Side by Side Diff: components/translate/content/renderer/translate_helper.h

Issue 2034153002: Makes RenderFrameObserver/RenderViewObserver::OnDestruct pure virtual. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 4 years, 6 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ 5 #ifndef COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_
6 #define COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ 6 #define COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 DEFERRED, // Language detection couldn't be performed when it was requested 156 DEFERRED, // Language detection couldn't be performed when it was requested
157 RESUMED, // A deferred language detection attempt was completed later 157 RESUMED, // A deferred language detection attempt was completed later
158 LANGUAGE_DETECTION_TIMING_MAX_VALUE // The bounding value for this enum 158 LANGUAGE_DETECTION_TIMING_MAX_VALUE // The bounding value for this enum
159 }; 159 };
160 160
161 // Converts language code to the one used in server supporting list. 161 // Converts language code to the one used in server supporting list.
162 static void ConvertLanguageCodeSynonym(std::string* code); 162 static void ConvertLanguageCodeSynonym(std::string* code);
163 163
164 // RenderFrameObserver implementation. 164 // RenderFrameObserver implementation.
165 bool OnMessageReceived(const IPC::Message& message) override; 165 bool OnMessageReceived(const IPC::Message& message) override;
166 void OnDestruct() override;
166 167
167 // Informs us that the page's text has been extracted. 168 // Informs us that the page's text has been extracted.
168 void PageCapturedImpl(int page_seq_no, const base::string16& contents); 169 void PageCapturedImpl(int page_seq_no, const base::string16& contents);
169 170
170 // Cancels any translation that is currently being performed. This does not 171 // Cancels any translation that is currently being performed. This does not
171 // revert existing translations. 172 // revert existing translations.
172 void CancelPendingTranslation(); 173 void CancelPendingTranslation();
173 174
174 // Checks if the current running page translation is finished or errored and 175 // Checks if the current running page translation is finished or errored and
175 // notifies the browser accordingly. If the translation has not terminated, 176 // notifies the browser accordingly. If the translation has not terminated,
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 250
250 // Method factory used to make calls to TranslatePageImpl. 251 // Method factory used to make calls to TranslatePageImpl.
251 base::WeakPtrFactory<TranslateHelper> weak_method_factory_; 252 base::WeakPtrFactory<TranslateHelper> weak_method_factory_;
252 253
253 DISALLOW_COPY_AND_ASSIGN(TranslateHelper); 254 DISALLOW_COPY_AND_ASSIGN(TranslateHelper);
254 }; 255 };
255 256
256 } // namespace translate 257 } // namespace translate
257 258
258 #endif // COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_ 259 #endif // COMPONENTS_TRANSLATE_CONTENT_RENDERER_TRANSLATE_HELPER_H_
OLDNEW
« no previous file with comments | « components/printing/renderer/print_web_view_helper.cc ('k') | components/translate/content/renderer/translate_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698