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

Unified Diff: chrome/browser/ui/browser_command_controller.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (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 | « chrome/browser/ui/browser_close_browsertest.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_command_controller.cc
===================================================================
--- chrome/browser/ui/browser_command_controller.cc (revision 145001)
+++ chrome/browser/ui/browser_command_controller.cc (working copy)
@@ -20,6 +20,7 @@
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
@@ -228,7 +229,7 @@
// tab. However, Ben says he tried removing this before and got lots of
// crashes, e.g. from Windows sending WM_COMMANDs at random times during
// window construction. This probably could use closer examination someday.
- if (!browser_->GetActiveTabContents())
+ if (!chrome::GetActiveTabContents(browser_))
return;
DCHECK(command_updater_.IsCommandEnabled(id)) << "Invalid/disabled command "
@@ -856,7 +857,7 @@
}
void BrowserCommandController::UpdateCommandsForTabState() {
- TabContents* current_tab_contents = browser_->GetActiveTabContents();
+ TabContents* current_tab_contents = chrome::GetActiveTabContents(browser_);
if (!current_tab_contents) // May be NULL during tab restore.
return;
WebContents* current_web_contents = current_tab_contents->web_contents();
« no previous file with comments | « chrome/browser/ui/browser_close_browsertest.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698