| 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 #include "chrome/browser/translate/translate_manager.h" | 5 #include "chrome/browser/translate/translate_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "chrome/browser/ui/browser.h" | 28 #include "chrome/browser/ui/browser.h" |
| 29 #include "chrome/browser/ui/browser_list.h" | 29 #include "chrome/browser/ui/browser_list.h" |
| 30 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 30 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 31 #include "chrome/common/chrome_notification_types.h" | 31 #include "chrome/common/chrome_notification_types.h" |
| 32 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
| 33 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
| 34 #include "chrome/common/render_messages.h" | 34 #include "chrome/common/render_messages.h" |
| 35 #include "chrome/common/translate_errors.h" | 35 #include "chrome/common/translate_errors.h" |
| 36 #include "chrome/common/url_constants.h" | 36 #include "chrome/common/url_constants.h" |
| 37 #include "content/browser/renderer_host/render_view_host.h" | 37 #include "content/browser/renderer_host/render_view_host.h" |
| 38 #include "content/browser/tab_contents/navigation_controller.h" | 38 #include "content/public/browser/navigation_controller.h" |
| 39 #include "content/public/browser/web_contents.h" | |
| 40 #include "content/public/browser/navigation_details.h" | 39 #include "content/public/browser/navigation_details.h" |
| 41 #include "content/public/browser/navigation_entry.h" | 40 #include "content/public/browser/navigation_entry.h" |
| 42 #include "content/public/browser/notification_details.h" | 41 #include "content/public/browser/notification_details.h" |
| 43 #include "content/public/browser/notification_service.h" | 42 #include "content/public/browser/notification_service.h" |
| 44 #include "content/public/browser/notification_source.h" | 43 #include "content/public/browser/notification_source.h" |
| 45 #include "content/public/browser/notification_types.h" | 44 #include "content/public/browser/notification_types.h" |
| 46 #include "content/public/browser/render_process_host.h" | 45 #include "content/public/browser/render_process_host.h" |
| 46 #include "content/public/browser/web_contents.h" |
| 47 #include "content/public/common/url_fetcher.h" | 47 #include "content/public/common/url_fetcher.h" |
| 48 #include "grit/browser_resources.h" | 48 #include "grit/browser_resources.h" |
| 49 #include "net/base/escape.h" | 49 #include "net/base/escape.h" |
| 50 #include "net/url_request/url_request_status.h" | 50 #include "net/url_request/url_request_status.h" |
| 51 #include "ui/base/resource/resource_bundle.h" | 51 #include "ui/base/resource/resource_bundle.h" |
| 52 | 52 |
| 53 using content::NavigationEntry; | 53 using content::NavigationEntry; |
| 54 using content::WebContents; | 54 using content::WebContents; |
| 55 | 55 |
| 56 namespace { | 56 namespace { |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper(); | 834 InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper(); |
| 835 | 835 |
| 836 for (size_t i = 0; i < infobar_helper->infobar_count(); ++i) { | 836 for (size_t i = 0; i < infobar_helper->infobar_count(); ++i) { |
| 837 TranslateInfoBarDelegate* delegate = | 837 TranslateInfoBarDelegate* delegate = |
| 838 infobar_helper->GetInfoBarDelegateAt(i)->AsTranslateInfoBarDelegate(); | 838 infobar_helper->GetInfoBarDelegateAt(i)->AsTranslateInfoBarDelegate(); |
| 839 if (delegate) | 839 if (delegate) |
| 840 return delegate; | 840 return delegate; |
| 841 } | 841 } |
| 842 return NULL; | 842 return NULL; |
| 843 } | 843 } |
| OLD | NEW |