| 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/tab_contents/language_state.h" | 5 #include "chrome/browser/tab_contents/language_state.h" |
| 6 | 6 |
| 7 #include "content/browser/tab_contents/navigation_controller.h" | 7 #include "content/public/browser/navigation_controller.h" |
| 8 #include "content/public/browser/navigation_details.h" | 8 #include "content/public/browser/navigation_details.h" |
| 9 #include "content/public/browser/navigation_entry.h" | 9 #include "content/public/browser/navigation_entry.h" |
| 10 | 10 |
| 11 using content::NavigationController; |
| 12 |
| 11 LanguageState::LanguageState(NavigationController* nav_controller) | 13 LanguageState::LanguageState(NavigationController* nav_controller) |
| 12 : navigation_controller_(nav_controller), | 14 : navigation_controller_(nav_controller), |
| 13 page_translatable_(false), | 15 page_translatable_(false), |
| 14 translation_pending_(false), | 16 translation_pending_(false), |
| 15 translation_declined_(false), | 17 translation_declined_(false), |
| 16 in_page_navigation_(false) { | 18 in_page_navigation_(false) { |
| 17 } | 19 } |
| 18 | 20 |
| 19 LanguageState::~LanguageState() { | 21 LanguageState::~LanguageState() { |
| 20 } | 22 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 prev_original_lang_ != prev_current_lang_ && | 71 prev_original_lang_ != prev_current_lang_ && |
| 70 original_lang_ == current_lang_ && | 72 original_lang_ == current_lang_ && |
| 71 navigation_controller_->GetActiveEntry() && | 73 navigation_controller_->GetActiveEntry() && |
| 72 navigation_controller_->GetActiveEntry()->GetTransitionType() == | 74 navigation_controller_->GetActiveEntry()->GetTransitionType() == |
| 73 content::PAGE_TRANSITION_LINK) { | 75 content::PAGE_TRANSITION_LINK) { |
| 74 return prev_current_lang_; | 76 return prev_current_lang_; |
| 75 } | 77 } |
| 76 | 78 |
| 77 return std::string(); | 79 return std::string(); |
| 78 } | 80 } |
| OLD | NEW |