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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 10677009: Move command handling and updating off Browser and onto a helper object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « no previous file | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
===================================================================
--- chrome/browser/app_controller_mac.mm (revision 144460)
+++ chrome/browser/app_controller_mac.mm (working copy)
@@ -827,7 +827,7 @@
// Create a new tab in an existing browser window (which we activate) if
// possible.
if (Browser* browser = ActivateBrowser(lastProfile)) {
- browser->ExecuteCommand(IDC_NEW_TAB);
+ chrome::ExecuteCommand(browser, IDC_NEW_TAB);
break;
}
// Else fall through to create new window.
@@ -835,10 +835,12 @@
CreateBrowser(lastProfile);
break;
case IDC_FOCUS_LOCATION:
- ActivateOrCreateBrowser(lastProfile)->ExecuteCommand(IDC_FOCUS_LOCATION);
+ chrome::ExecuteCommand(ActivateOrCreateBrowser(lastProfile),
+ IDC_FOCUS_LOCATION);
break;
case IDC_FOCUS_SEARCH:
- ActivateOrCreateBrowser(lastProfile)->ExecuteCommand(IDC_FOCUS_SEARCH);
+ chrome::ExecuteCommand(ActivateOrCreateBrowser(lastProfile),
+ IDC_FOCUS_SEARCH);
break;
case IDC_NEW_INCOGNITO_WINDOW:
CreateBrowser(lastProfile->GetOffTheRecordProfile());
@@ -847,7 +849,7 @@
chrome::OpenWindowWithRestoredTabs(lastProfile);
break;
case IDC_OPEN_FILE:
- CreateBrowser(lastProfile)->ExecuteCommand(IDC_OPEN_FILE);
+ chrome::ExecuteCommand(CreateBrowser(lastProfile), IDC_OPEN_FILE);
break;
case IDC_CLEAR_BROWSING_DATA: {
// There may not be a browser open, so use the default profile.
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698