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

Side by Side Diff: chrome/browser/browser_commands.cc

Issue 7320: Rename various text zoom related stuff to be more generic, since we now can... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/render_view_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/browser.h" 5 #include "chrome/browser/browser.h"
6 6
7 #include <commdlg.h> 7 #include <commdlg.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "base/file_version_info.h" 10 #include "base/file_version_info.h"
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 case IDC_EDIT_SEARCH_ENGINES: { 505 case IDC_EDIT_SEARCH_ENGINES: {
506 UserMetrics::RecordAction(L"EditSearchEngines", profile_); 506 UserMetrics::RecordAction(L"EditSearchEngines", profile_);
507 OpenKeywordEditor(); 507 OpenKeywordEditor();
508 break; 508 break;
509 } 509 }
510 510
511 case IDC_ZOOM_PLUS: { 511 case IDC_ZOOM_PLUS: {
512 UserMetrics::RecordAction(L"ZoomPlus", profile_); 512 UserMetrics::RecordAction(L"ZoomPlus", profile_);
513 TabContents* current_tab = GetSelectedTabContents(); 513 TabContents* current_tab = GetSelectedTabContents();
514 if (current_tab->AsWebContents()) { 514 if (current_tab->AsWebContents()) {
515 current_tab->AsWebContents()->render_view_host()->AlterTextSize( 515 current_tab->AsWebContents()->render_view_host()->Zoom(
516 text_zoom::TEXT_LARGER); 516 PageZoom::LARGER);
517 } 517 }
518 break; 518 break;
519 } 519 }
520 520
521 case IDC_ZOOM_MINUS: { 521 case IDC_ZOOM_MINUS: {
522 UserMetrics::RecordAction(L"ZoomMinus", profile_); 522 UserMetrics::RecordAction(L"ZoomMinus", profile_);
523 TabContents* current_tab = GetSelectedTabContents(); 523 TabContents* current_tab = GetSelectedTabContents();
524 if (current_tab->AsWebContents()) { 524 if (current_tab->AsWebContents()) {
525 current_tab->AsWebContents()->render_view_host()->AlterTextSize( 525 current_tab->AsWebContents()->render_view_host()->Zoom(
526 text_zoom::TEXT_SMALLER); 526 PageZoom::SMALLER);
527 } 527 }
528 break; 528 break;
529 } 529 }
530 530
531 case IDC_ZOOM_NORMAL: { 531 case IDC_ZOOM_NORMAL: {
532 UserMetrics::RecordAction(L"ZoomNormal", profile_); 532 UserMetrics::RecordAction(L"ZoomNormal", profile_);
533 TabContents* current_tab = GetSelectedTabContents(); 533 TabContents* current_tab = GetSelectedTabContents();
534 if (current_tab->AsWebContents()) { 534 if (current_tab->AsWebContents()) {
535 current_tab->AsWebContents()->render_view_host()->AlterTextSize( 535 current_tab->AsWebContents()->render_view_host()->Zoom(
536 text_zoom::TEXT_STANDARD); 536 PageZoom::STANDARD);
537 } 537 }
538 break; 538 break;
539 } 539 }
540 540
541 case IDC_OPENFILE: { 541 case IDC_OPENFILE: {
542 UserMetrics::RecordAction(L"OpenFile", profile_); 542 UserMetrics::RecordAction(L"OpenFile", profile_);
543 if (!select_file_dialog_.get()) 543 if (!select_file_dialog_.get())
544 select_file_dialog_ = SelectFileDialog::Create(this); 544 select_file_dialog_ = SelectFileDialog::Create(this);
545 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE, 545 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE,
546 L"", L"", GetTopLevelHWND(), NULL); 546 L"", L"", GetTopLevelHWND(), NULL);
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 1048
1049 //////////////////////////////////////////////////////////////////////////////// 1049 ////////////////////////////////////////////////////////////////////////////////
1050 // Browser, SelectFileDialog::Listener implementation: 1050 // Browser, SelectFileDialog::Listener implementation:
1051 1051
1052 void Browser::FileSelected(const std::wstring& path, void* params) { 1052 void Browser::FileSelected(const std::wstring& path, void* params) {
1053 GURL file_url = net::FilePathToFileURL(path); 1053 GURL file_url = net::FilePathToFileURL(path);
1054 if (!file_url.is_empty()) 1054 if (!file_url.is_empty())
1055 OpenURL(file_url, CURRENT_TAB, PageTransition::TYPED); 1055 OpenURL(file_url, CURRENT_TAB, PageTransition::TYPED);
1056 } 1056 }
1057 1057
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698