| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 188   // notifies the browser accordingly.  If the translation has not terminated, | 188   // notifies the browser accordingly.  If the translation has not terminated, | 
| 189   // posts a task to check again later. | 189   // posts a task to check again later. | 
| 190   void CheckTranslateStatus(int page_seq_no); | 190   void CheckTranslateStatus(int page_seq_no); | 
| 191 | 191 | 
| 192   // Called by TranslatePage to do the actual translation.  |count| is used to | 192   // Called by TranslatePage to do the actual translation.  |count| is used to | 
| 193   // limit the number of retries. | 193   // limit the number of retries. | 
| 194   void TranslatePageImpl(int page_seq_no, int count); | 194   void TranslatePageImpl(int page_seq_no, int count); | 
| 195 | 195 | 
| 196   // Sends a message to the browser to notify it that the translation failed | 196   // Sends a message to the browser to notify it that the translation failed | 
| 197   // with |error|. | 197   // with |error|. | 
| 198   void NotifyBrowserTranslationFailed(TranslateErrors::Type error); | 198   void NotifyBrowserTranslationFailed(translate::TranslateErrors::Type error); | 
| 199 | 199 | 
| 200   // Convenience method to access the main frame.  Can return NULL, typically | 200   // Convenience method to access the main frame.  Can return NULL, typically | 
| 201   // if the page is being closed. | 201   // if the page is being closed. | 
| 202   blink::WebFrame* GetMainFrame(); | 202   blink::WebFrame* GetMainFrame(); | 
| 203 | 203 | 
| 204   // Do not ask for CLD data any more. | 204   // Do not ask for CLD data any more. | 
| 205   void CancelCldDataPolling(); | 205   void CancelCldDataPolling(); | 
| 206 | 206 | 
| 207   // Invoked when PageCaptured is called prior to obtaining CLD data. This | 207   // Invoked when PageCaptured is called prior to obtaining CLD data. This | 
| 208   // method stores the page ID into deferred_page_id_ and COPIES the contents | 208   // method stores the page ID into deferred_page_id_ and COPIES the contents | 
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 259   int deferred_page_seq_no_; | 259   int deferred_page_seq_no_; | 
| 260 | 260 | 
| 261   // The contents of the page most recently reported to PageCaptured if | 261   // The contents of the page most recently reported to PageCaptured if | 
| 262   // deferred_page_capture_ is true. | 262   // deferred_page_capture_ is true. | 
| 263   base::string16 deferred_contents_; | 263   base::string16 deferred_contents_; | 
| 264 | 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_ | 
| OLD | NEW | 
|---|