summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/toolbar/toolbar_model.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 02:15:25 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-16 02:15:25 +0000
commitdb6a876afe73ed1ad3befa04d0612527222ac168 (patch)
tree9b38fe9b3a85c8e90bdce18a0c5a163feb1788be /chrome/browser/ui/toolbar/toolbar_model.cc
parent1054bd6ea428148abc41de3285826edccb1244a5 (diff)
downloadchromium_src-db6a876afe73ed1ad3befa04d0612527222ac168.zip
chromium_src-db6a876afe73ed1ad3befa04d0612527222ac168.tar.gz
chromium_src-db6a876afe73ed1ad3befa04d0612527222ac168.tar.bz2
Revert 126959 - Re-factor location bar/toolbar code to get rid of the browser dependency. This CL is needed to allow code reusing by captive portal view, which will show web content using DomView.
BUG=chromium-os:22630 TEST=browser_tests,unit_tests works Review URL: http://codereview.chromium.org/9479008 TBR=altimofeev@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127083 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/toolbar/toolbar_model.cc')
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/ui/toolbar/toolbar_model.cc b/chrome/browser/ui/toolbar/toolbar_model.cc
index 23afe521..b769829 100644
--- a/chrome/browser/ui/toolbar/toolbar_model.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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/toolbar/toolbar_model_delegate.h"
+#include "chrome/browser/ui/browser.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(ToolbarModelDelegate* delegate)
- : delegate_(delegate),
+ToolbarModel::ToolbarModel(Browser* browser)
+ : browser_(browser),
input_in_progress_(false) {
}
@@ -84,7 +84,7 @@ bool ToolbarModel::ShouldDisplayURL() const {
}
}
- WebContents* web_contents = delegate_->GetActiveWebContents();
+ WebContents* web_contents = browser_->GetSelectedWebContents();
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 = delegate_->GetActiveWebContents();
+ WebContents* current_tab = browser_->GetSelectedWebContents();
return current_tab ? &current_tab->GetController() : NULL;
}