Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: chrome/browser/tab_contents/language_state.cc

Issue 8983010: Convert WebContents to return a content::NavigationController instead of the implementation. Upda... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698