diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 22:41:28 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-31 22:41:28 +0000 |
commit | 195442ebb93e6c6246583250fa4a0dcbb3cec7d0 (patch) | |
tree | ff402b20fdc82e749860ac6ef866fd932e5cd5b6 /chrome/browser/browser_commands.cc | |
parent | 7451693da9a8b91ff52d4394e3f106e1687fefd2 (diff) | |
download | chromium_src-195442ebb93e6c6246583250fa4a0dcbb3cec7d0.zip chromium_src-195442ebb93e6c6246583250fa4a0dcbb3cec7d0.tar.gz chromium_src-195442ebb93e6c6246583250fa4a0dcbb3cec7d0.tar.bz2 |
Move BrowserToolbarView to the frames (XPFrame/VistaFrame).
This causes some temporary duplication of code in xp/vista frames but it will be temporary. My goal is to move all the top level browser level views into the frames. From there, I will move them from the frames into their new home - BrowserView (chrome/browser/views/frames/browser_view.cc), and each frame will host a BrowserView. This will reduce duplication of code.
To make this change I had to add a bunch of methods to the BrowserWindow (nee ChromeFrame) interface to provide access to some of the toolbar's contents. Excuse the ugly API, we will be improving this incrementally.
B=1031854
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_commands.cc')
-rw-r--r-- | chrome/browser/browser_commands.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/browser_commands.cc b/chrome/browser/browser_commands.cc index cdfc7a2..79e1f06 100644 --- a/chrome/browser/browser_commands.cc +++ b/chrome/browser/browser_commands.cc @@ -393,10 +393,7 @@ void Browser::ExecuteCommand(int id) { case IDC_FOCUS_TOOLBAR: UserMetrics::RecordAction(L"FocusToolbar", profile_); { - ChromeViews::View* tb = GetToolbar(); - if (tb) { - tb->RequestFocus(); - } + window_->FocusToolbar(); } break; @@ -871,8 +868,8 @@ void Browser::StarCurrentTabContents() { if (url.is_empty() || !url.is_valid()) return; - if (toolbar_.star_button()) { - if (!toolbar_.star_button()->is_bubble_showing()) { + if (window_->GetStarButton()) { + if (!window_->GetStarButton()->is_bubble_showing()) { const bool newly_bookmarked = (model->GetNodeByURL(url) == NULL); if (newly_bookmarked) { model->SetURLStarred(url, entry->GetTitle(), true); @@ -882,7 +879,7 @@ void Browser::StarCurrentTabContents() { return; } } - toolbar_.star_button()->ShowStarBubble(url, newly_bookmarked); + window_->GetStarButton()->ShowStarBubble(url, newly_bookmarked); } } else if (model->GetNodeByURL(url)) { // If we can't find the star button and the user wanted to unstar it, |