OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 | 6 |
7 #include "chrome/browser/views/frame/browser_view.h" | 7 #include "chrome/browser/views/frame/browser_view.h" |
8 | 8 |
9 #include "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1337 return y + height; | 1337 return y + height; |
1338 } | 1338 } |
1339 | 1339 |
1340 int BrowserView::LayoutToolbar(int top) { | 1340 int BrowserView::LayoutToolbar(int top) { |
1341 int browser_view_width = width(); | 1341 int browser_view_width = width(); |
1342 #ifdef CHROME_PERSONALIZATION | 1342 #ifdef CHROME_PERSONALIZATION |
1343 if (IsPersonalizationEnabled()) | 1343 if (IsPersonalizationEnabled()) |
1344 Personalization::AdjustBrowserView(personalization_, &browser_view_width); | 1344 Personalization::AdjustBrowserView(personalization_, &browser_view_width); |
1345 #endif | 1345 #endif |
1346 bool visible = IsToolbarVisible(); | 1346 bool visible = IsToolbarVisible(); |
| 1347 toolbar_->GetLocationBarView()->SetFocusable(visible); |
1347 int y = top - | 1348 int y = top - |
1348 ((visible && IsTabStripVisible()) ? kToolbarTabStripVerticalOverlap : 0); | 1349 ((visible && IsTabStripVisible()) ? kToolbarTabStripVerticalOverlap : 0); |
1349 int height = visible ? toolbar_->GetPreferredSize().height() : 0; | 1350 int height = visible ? toolbar_->GetPreferredSize().height() : 0; |
1350 toolbar_->SetVisible(visible); | 1351 toolbar_->SetVisible(visible); |
1351 toolbar_->SetBounds(0, y, browser_view_width, height); | 1352 toolbar_->SetBounds(0, y, browser_view_width, height); |
1352 return y + height; | 1353 return y + height; |
1353 } | 1354 } |
1354 | 1355 |
1355 int BrowserView::LayoutBookmarkAndInfoBars(int top) { | 1356 int BrowserView::LayoutBookmarkAndInfoBars(int top) { |
1356 find_bar_y_ = top + y() - 1; | 1357 find_bar_y_ = top + y() - 1; |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1656 | 1657 |
1657 // static | 1658 // static |
1658 void BrowserView::InitClass() { | 1659 void BrowserView::InitClass() { |
1659 static bool initialized = false; | 1660 static bool initialized = false; |
1660 if (!initialized) { | 1661 if (!initialized) { |
1661 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 1662 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
1662 default_favicon_ = *rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); | 1663 default_favicon_ = *rb.GetBitmapNamed(IDR_DEFAULT_FAVICON); |
1663 initialized = true; | 1664 initialized = true; |
1664 } | 1665 } |
1665 } | 1666 } |
OLD | NEW |