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

Unified Diff: chrome/browser/ui/toolbar/toolbar_model.cc

Issue 9703099: Revert 126959 - Re-factor location bar/toolbar code to get rid of the browser dependency. This CL i… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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/toolbar/toolbar_model.h ('k') | chrome/browser/ui/toolbar/toolbar_model_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/toolbar_model.cc
===================================================================
--- chrome/browser/ui/toolbar/toolbar_model.cc (revision 127082)
+++ chrome/browser/ui/toolbar/toolbar_model.cc (working copy)
@@ -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::SSLStatus;
using content::WebContents;
-ToolbarModel::ToolbarModel(ToolbarModelDelegate* delegate)
- : delegate_(delegate),
+ToolbarModel::ToolbarModel(Browser* browser)
+ : browser_(browser),
input_in_progress_(false) {
}
@@ -84,7 +84,7 @@
}
}
- 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 @@
// 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;
}
Property changes on: chrome/browser/ui/toolbar/toolbar_model.cc
___________________________________________________________________
Deleted: svn:mergeinfo
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model.h ('k') | chrome/browser/ui/toolbar/toolbar_model_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698