Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "chrome/browser/translate/translate_tab_helper.h" | 5 #include "chrome/browser/translate/translate_tab_helper.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 #include "content/public/browser/navigation_details.h" | 29 #include "content/public/browser/navigation_details.h" |
| 30 #include "content/public/browser/navigation_entry.h" | 30 #include "content/public/browser/navigation_entry.h" |
| 31 #include "content/public/browser/notification_service.h" | 31 #include "content/public/browser/notification_service.h" |
| 32 #include "content/public/browser/web_contents.h" | 32 #include "content/public/browser/web_contents.h" |
| 33 #include "net/http/http_status_code.h" | 33 #include "net/http/http_status_code.h" |
| 34 #include "url/gurl.h" | 34 #include "url/gurl.h" |
| 35 | 35 |
| 36 #if defined(CLD2_DYNAMIC_MODE) | 36 #if defined(CLD2_DYNAMIC_MODE) |
| 37 #include "base/files/file.h" | 37 #include "base/files/file.h" |
| 38 #include "base/path_service.h" | 38 #include "base/path_service.h" |
| 39 #include "chrome/common/chrome_constants.h" | |
|
Andrew Hayden (chromium.org)
2014/04/16 20:08:20
This won't be in the final submit; it was necessar
| |
| 39 #include "chrome/common/chrome_paths.h" | 40 #include "chrome/common/chrome_paths.h" |
| 40 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
| 41 #include "content/public/browser/render_process_host.h" | 42 #include "content/public/browser/render_process_host.h" |
| 42 #include "content/public/browser/render_view_host.h" | 43 #include "content/public/browser/render_view_host.h" |
| 43 #endif | 44 #endif |
| 44 | 45 |
| 45 namespace { | 46 namespace { |
| 46 | 47 |
| 47 // The maximum number of attempts we'll do to see if the page has finshed | 48 // The maximum number of attempts we'll do to see if the page has finshed |
| 48 // loading before giving up the translation | 49 // loading before giving up the translation |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 521 if (GetLanguageState().InTranslateNavigation()) | 522 if (GetLanguageState().InTranslateNavigation()) |
| 522 return; | 523 return; |
| 523 } | 524 } |
| 524 | 525 |
| 525 TranslateBubbleFactory::Show( | 526 TranslateBubbleFactory::Show( |
| 526 browser->window(), web_contents(), step, error_type); | 527 browser->window(), web_contents(), step, error_type); |
| 527 #else | 528 #else |
| 528 NOTREACHED(); | 529 NOTREACHED(); |
| 529 #endif | 530 #endif |
| 530 } | 531 } |
| OLD | NEW |