OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tab_contents/tab_contents.h" | 5 #include "chrome/browser/tab_contents/tab_contents.h" |
6 | 6 |
7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
8 // For GdkScreen | 8 // For GdkScreen |
9 #include <gdk/gdk.h> | 9 #include <gdk/gdk.h> |
10 #endif // defined(OS_CHROMEOS) | 10 #endif // defined(OS_CHROMEOS) |
(...skipping 2091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2102 TranslateErrors::Type error_type) { | 2102 TranslateErrors::Type error_type) { |
2103 language_state_.set_current_language(translated_lang); | 2103 language_state_.set_current_language(translated_lang); |
2104 language_state_.set_translation_pending(false); | 2104 language_state_.set_translation_pending(false); |
2105 PageTranslatedDetails details(original_lang, translated_lang, error_type); | 2105 PageTranslatedDetails details(original_lang, translated_lang, error_type); |
2106 NotificationService::current()->Notify( | 2106 NotificationService::current()->Notify( |
2107 NotificationType::PAGE_TRANSLATED, | 2107 NotificationType::PAGE_TRANSLATED, |
2108 Source<TabContents>(this), | 2108 Source<TabContents>(this), |
2109 Details<PageTranslatedDetails>(&details)); | 2109 Details<PageTranslatedDetails>(&details)); |
2110 } | 2110 } |
2111 | 2111 |
| 2112 void TabContents::OnSetSuggestResult(int32 page_id, const std::string& result) { |
| 2113 if (delegate()) |
| 2114 delegate()->OnSetSuggestResult(page_id, result); |
| 2115 } |
| 2116 |
2112 void TabContents::DidStartProvisionalLoadForFrame( | 2117 void TabContents::DidStartProvisionalLoadForFrame( |
2113 RenderViewHost* render_view_host, | 2118 RenderViewHost* render_view_host, |
2114 bool is_main_frame, | 2119 bool is_main_frame, |
2115 const GURL& url) { | 2120 const GURL& url) { |
2116 ProvisionalLoadDetails details(is_main_frame, | 2121 ProvisionalLoadDetails details(is_main_frame, |
2117 controller_.IsURLInPageNavigation(url), | 2122 controller_.IsURLInPageNavigation(url), |
2118 url, std::string(), false); | 2123 url, std::string(), false); |
2119 NotificationService::current()->Notify( | 2124 NotificationService::current()->Notify( |
2120 NotificationType::FRAME_PROVISIONAL_LOAD_START, | 2125 NotificationType::FRAME_PROVISIONAL_LOAD_START, |
2121 Source<NavigationController>(&controller_), | 2126 Source<NavigationController>(&controller_), |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3233 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); | 3238 AddInfoBar(new SavePasswordInfoBarDelegate(this, form_to_save)); |
3234 } | 3239 } |
3235 | 3240 |
3236 Profile* TabContents::GetProfileForPasswordManager() { | 3241 Profile* TabContents::GetProfileForPasswordManager() { |
3237 return profile(); | 3242 return profile(); |
3238 } | 3243 } |
3239 | 3244 |
3240 bool TabContents::DidLastPageLoadEncounterSSLErrors() { | 3245 bool TabContents::DidLastPageLoadEncounterSSLErrors() { |
3241 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); | 3246 return controller().ssl_manager()->ProcessedSSLErrorFromRequest(); |
3242 } | 3247 } |
OLD | NEW |