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

Side by Side Diff: chrome/renderer/translate/translate_helper.h

Issue 569233002: Refactoring the order of the weak_ptr_factory in chrome/renderer folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_ 5 #ifndef CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_
6 #define CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_ 6 #define CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 // The states associated with the current translation. 232 // The states associated with the current translation.
233 bool translation_pending_; 233 bool translation_pending_;
234 std::string source_lang_; 234 std::string source_lang_;
235 std::string target_lang_; 235 std::string target_lang_;
236 236
237 // Time when a page langauge is determined. This is used to know a duration 237 // Time when a page langauge is determined. This is used to know a duration
238 // time from showing infobar to requesting translation. 238 // time from showing infobar to requesting translation.
239 base::TimeTicks language_determined_time_; 239 base::TimeTicks language_determined_time_;
240 240
241 // Method factory used to make calls to TranslatePageImpl.
242 base::WeakPtrFactory<TranslateHelper> weak_method_factory_;
243
244 // Provides CLD data for this process. 241 // Provides CLD data for this process.
245 scoped_ptr<translate::RendererCldDataProvider> cld_data_provider_; 242 scoped_ptr<translate::RendererCldDataProvider> cld_data_provider_;
246 243
247 // Whether or not polling for CLD2 data has started. 244 // Whether or not polling for CLD2 data has started.
248 bool cld_data_polling_started_; 245 bool cld_data_polling_started_;
249 246
250 // Whether or not CancelCldDataPolling has been called. 247 // Whether or not CancelCldDataPolling has been called.
251 bool cld_data_polling_canceled_; 248 bool cld_data_polling_canceled_;
252 249
253 // Whether or not a PageCaptured event arrived prior to CLD data becoming 250 // Whether or not a PageCaptured event arrived prior to CLD data becoming
254 // available. If true, deferred_contents_ contains the most recent contents. 251 // available. If true, deferred_contents_ contains the most recent contents.
255 bool deferred_page_capture_; 252 bool deferred_page_capture_;
256 253
257 // The ID of the page most recently reported to PageCaptured if 254 // The ID of the page most recently reported to PageCaptured if
258 // deferred_page_capture_ is true. 255 // deferred_page_capture_ is true.
259 int deferred_page_seq_no_; 256 int deferred_page_seq_no_;
260 257
261 // The contents of the page most recently reported to PageCaptured if 258 // The contents of the page most recently reported to PageCaptured if
262 // deferred_page_capture_ is true. 259 // deferred_page_capture_ is true.
263 base::string16 deferred_contents_; 260 base::string16 deferred_contents_;
264 261
262 // Method factory used to make calls to TranslatePageImpl.
263 base::WeakPtrFactory<TranslateHelper> weak_method_factory_;
264
265 DISALLOW_COPY_AND_ASSIGN(TranslateHelper); 265 DISALLOW_COPY_AND_ASSIGN(TranslateHelper);
266 }; 266 };
267 267
268 #endif // CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_ 268 #endif // CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/printing/print_web_view_helper.h ('k') | chrome/renderer/translate/translate_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698