| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ |
| 6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ | 6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 bool IsOffTheRecord() override; | 89 bool IsOffTheRecord() override; |
| 90 const std::string& GetContentsMimeType() override; | 90 const std::string& GetContentsMimeType() override; |
| 91 const GURL& GetLastCommittedURL() override; | 91 const GURL& GetLastCommittedURL() override; |
| 92 const GURL& GetVisibleURL() override; | 92 const GURL& GetVisibleURL() override; |
| 93 bool HasCurrentPage() override; | 93 bool HasCurrentPage() override; |
| 94 void OpenUrlInNewTab(const GURL& url) override; | 94 void OpenUrlInNewTab(const GURL& url) override; |
| 95 | 95 |
| 96 // content::WebContentsObserver implementation. | 96 // content::WebContentsObserver implementation. |
| 97 void NavigationEntryCommitted( | 97 void NavigationEntryCommitted( |
| 98 const content::LoadCommittedDetails& load_details) override; | 98 const content::LoadCommittedDetails& load_details) override; |
| 99 void DidNavigateAnyFrame(content::RenderFrameHost* render_frame_host, | 99 void DidFinishNavigation( |
| 100 const content::LoadCommittedDetails& details, | 100 content::NavigationHandle* navigation_handle) override; |
| 101 const content::FrameNavigateParams& params) override; | |
| 102 | 101 |
| 103 void OnPageTranslated(bool cancelled, | 102 void OnPageTranslated(bool cancelled, |
| 104 const std::string& original_lang, | 103 const std::string& original_lang, |
| 105 const std::string& translated_lang, | 104 const std::string& translated_lang, |
| 106 TranslateErrors::Type error_type); | 105 TranslateErrors::Type error_type); |
| 107 | 106 |
| 108 // mojom::ContentTranslateDriver implementation. | 107 // mojom::ContentTranslateDriver implementation. |
| 109 void RegisterPage(mojom::PagePtr page, | 108 void RegisterPage(mojom::PagePtr page, |
| 110 const LanguageDetectionDetails& details, | 109 const LanguageDetectionDetails& details, |
| 111 bool page_needs_translation) override; | 110 bool page_needs_translation) override; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 132 mojo::BindingSet<mojom::ContentTranslateDriver> bindings_; | 131 mojo::BindingSet<mojom::ContentTranslateDriver> bindings_; |
| 133 | 132 |
| 134 base::WeakPtrFactory<ContentTranslateDriver> weak_pointer_factory_; | 133 base::WeakPtrFactory<ContentTranslateDriver> weak_pointer_factory_; |
| 135 | 134 |
| 136 DISALLOW_COPY_AND_ASSIGN(ContentTranslateDriver); | 135 DISALLOW_COPY_AND_ASSIGN(ContentTranslateDriver); |
| 137 }; | 136 }; |
| 138 | 137 |
| 139 } // namespace translate | 138 } // namespace translate |
| 140 | 139 |
| 141 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ | 140 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ |
| OLD | NEW |