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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 378253002: Fix translate namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing android build errors Created 6 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 return was_visible != zoom_view_->visible(); 1254 return was_visible != zoom_view_->visible();
1255 } 1255 }
1256 1256
1257 void LocationBarView::RefreshTranslateIcon() { 1257 void LocationBarView::RefreshTranslateIcon() {
1258 if (!TranslateService::IsTranslateBubbleEnabled()) 1258 if (!TranslateService::IsTranslateBubbleEnabled())
1259 return; 1259 return;
1260 1260
1261 WebContents* web_contents = GetWebContents(); 1261 WebContents* web_contents = GetWebContents();
1262 if (!web_contents) 1262 if (!web_contents)
1263 return; 1263 return;
1264 LanguageState& language_state = 1264 translate::LanguageState& language_state =
1265 ChromeTranslateClient::FromWebContents(web_contents)->GetLanguageState(); 1265 ChromeTranslateClient::FromWebContents(web_contents)->GetLanguageState();
1266 bool enabled = language_state.translate_enabled(); 1266 bool enabled = language_state.translate_enabled();
1267 command_updater()->UpdateCommandEnabled(IDC_TRANSLATE_PAGE, enabled); 1267 command_updater()->UpdateCommandEnabled(IDC_TRANSLATE_PAGE, enabled);
1268 translate_icon_view_->SetVisible(enabled); 1268 translate_icon_view_->SetVisible(enabled);
1269 translate_icon_view_->SetToggled(language_state.IsPageTranslated()); 1269 translate_icon_view_->SetToggled(language_state.IsPageTranslated());
1270 } 1270 }
1271 1271
1272 bool LocationBarView::RefreshManagePasswordsIconView() { 1272 bool LocationBarView::RefreshManagePasswordsIconView() {
1273 DCHECK(manage_passwords_icon_view_); 1273 DCHECK(manage_passwords_icon_view_);
1274 WebContents* web_contents = GetWebContents(); 1274 WebContents* web_contents = GetWebContents();
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 void LocationBarView::ModelChanged(const SearchModel::State& old_state, 1787 void LocationBarView::ModelChanged(const SearchModel::State& old_state,
1788 const SearchModel::State& new_state) { 1788 const SearchModel::State& new_state) {
1789 const bool visible = !GetToolbarModel()->input_in_progress() && 1789 const bool visible = !GetToolbarModel()->input_in_progress() &&
1790 new_state.voice_search_supported; 1790 new_state.voice_search_supported;
1791 if (mic_search_view_->visible() != visible) { 1791 if (mic_search_view_->visible() != visible) {
1792 mic_search_view_->SetVisible(visible); 1792 mic_search_view_->SetVisible(visible);
1793 Layout(); 1793 Layout();
1794 } 1794 }
1795 } 1795 }
1796 1796
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/translate/translate_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698