| OLD | NEW |
| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Convenience method to access the main frame. Can return NULL, typically | 144 // Convenience method to access the main frame. Can return NULL, typically |
| 145 // if the page is being closed. | 145 // if the page is being closed. |
| 146 WebKit::WebFrame* GetMainFrame(); | 146 WebKit::WebFrame* GetMainFrame(); |
| 147 | 147 |
| 148 // The states associated with the current translation. | 148 // The states associated with the current translation. |
| 149 bool translation_pending_; | 149 bool translation_pending_; |
| 150 int page_id_; | 150 int page_id_; |
| 151 std::string source_lang_; | 151 std::string source_lang_; |
| 152 std::string target_lang_; | 152 std::string target_lang_; |
| 153 | 153 |
| 154 // Time when a page langauge is determined. This is used to know a duration |
| 155 // time from showing infobar to requesting translation. |
| 156 base::TimeTicks language_determined_time_; |
| 157 |
| 154 // Method factory used to make calls to TranslatePageImpl. | 158 // Method factory used to make calls to TranslatePageImpl. |
| 155 base::WeakPtrFactory<TranslateHelper> weak_method_factory_; | 159 base::WeakPtrFactory<TranslateHelper> weak_method_factory_; |
| 156 | 160 |
| 157 DISALLOW_COPY_AND_ASSIGN(TranslateHelper); | 161 DISALLOW_COPY_AND_ASSIGN(TranslateHelper); |
| 158 }; | 162 }; |
| 159 | 163 |
| 160 #endif // CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_ | 164 #endif // CHROME_RENDERER_TRANSLATE_TRANSLATE_HELPER_H_ |
| OLD | NEW |