Index: chrome/browser/ui/toolbar/toolbar_model.cc |
diff --git a/chrome/browser/ui/toolbar/toolbar_model.cc b/chrome/browser/ui/toolbar/toolbar_model.cc |
index ef9d04497c9bfd0c3323f51e5b90b16a9b5d68c9..531aab021b07fd61bcb655820e6ba1fbd6937050 100644 |
--- a/chrome/browser/ui/toolbar/toolbar_model.cc |
+++ b/chrome/browser/ui/toolbar/toolbar_model.cc |
@@ -10,7 +10,7 @@ |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ssl/ssl_error_info.h" |
-#include "chrome/browser/ui/browser.h" |
+#include "chrome/browser/ui/toolbar/toolbar_model_host.h" |
#include "chrome/common/chrome_constants.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/common/url_constants.h" |
@@ -32,8 +32,8 @@ using content::NavigationEntry; |
using content::SSLStatus; |
using content::WebContents; |
-ToolbarModel::ToolbarModel(Browser* browser) |
- : browser_(browser), |
+ToolbarModel::ToolbarModel(ToolbarModelHost* host) |
+ : host_(host), |
input_in_progress_(false) { |
} |
@@ -84,7 +84,7 @@ bool ToolbarModel::ShouldDisplayURL() const { |
} |
} |
- WebContents* web_contents = browser_->GetSelectedWebContents(); |
+ WebContents* web_contents = host_->GetActiveWebContents(); |
if (web_contents && web_contents->GetWebUIForCurrentState()) |
return !web_contents->GetWebUIForCurrentState()->ShouldHideURL(); |
@@ -174,6 +174,6 @@ NavigationController* ToolbarModel::GetNavigationController() const { |
// This |current_tab| can be NULL during the initialization of the |
// toolbar during window creation (i.e. before any tabs have been added |
// to the window). |
- WebContents* current_tab = browser_->GetSelectedWebContents(); |
+ WebContents* current_tab = host_->GetActiveWebContents(); |
return current_tab ? ¤t_tab->GetController() : NULL; |
} |