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

Unified Diff: chrome/browser/browser_commands.cc

Issue 5005: Reorganize the declarations to have some grouping and logical ordering in tab... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/debugger/debugger_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_commands.cc
===================================================================
--- chrome/browser/browser_commands.cc (revision 2626)
+++ chrome/browser/browser_commands.cc (working copy)
@@ -230,7 +230,7 @@
}
case IDC_STOP: {
TabContents* current_tab = GetSelectedTabContents();
- return (current_tab && current_tab->IsLoading());
+ return (current_tab && current_tab->is_loading());
}
case IDC_CLOSETAB: {
return !IsApplication();
@@ -514,24 +514,30 @@
case IDC_ZOOM_PLUS: {
UserMetrics::RecordAction(L"ZoomPlus", profile_);
TabContents* current_tab = GetSelectedTabContents();
- DCHECK(current_tab);
- current_tab->AlterTextSize(text_zoom::TEXT_LARGER);
+ if (current_tab->AsWebContents()) {
+ current_tab->AsWebContents()->render_view_host()->AlterTextSize(
+ text_zoom::TEXT_LARGER);
+ }
break;
}
case IDC_ZOOM_MINUS: {
UserMetrics::RecordAction(L"ZoomMinus", profile_);
TabContents* current_tab = GetSelectedTabContents();
- DCHECK(current_tab);
- current_tab->AlterTextSize(text_zoom::TEXT_SMALLER);
+ if (current_tab->AsWebContents()) {
+ current_tab->AsWebContents()->render_view_host()->AlterTextSize(
+ text_zoom::TEXT_SMALLER);
+ }
break;
}
case IDC_ZOOM_NORMAL: {
UserMetrics::RecordAction(L"ZoomNormal", profile_);
TabContents* current_tab = GetSelectedTabContents();
- DCHECK(current_tab);
- current_tab->AlterTextSize(text_zoom::TEXT_STANDARD);
+ if (current_tab->AsWebContents()) {
+ current_tab->AsWebContents()->render_view_host()->AlterTextSize(
+ text_zoom::TEXT_STANDARD);
+ }
break;
}
@@ -629,7 +635,7 @@
CharacterEncoding::GetCanonicalEncodingNameByCommandId(id);
TabContents* current_tab = GetSelectedTabContents();
if (!cur_encoding_name.empty() && current_tab)
- current_tab->SetPageEncoding(cur_encoding_name);
+ current_tab->set_encoding(cur_encoding_name);
// Update user recently selected encoding list.
std::wstring new_selected_encoding_list;
if (CharacterEncoding::UpdateRecentlySelectdEncoding(
« no previous file with comments | « chrome/browser/browser_about_handler.cc ('k') | chrome/browser/debugger/debugger_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698