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

Unified Diff: chrome/browser/ui/views/frame/browser_view_layout.cc

Issue 7057014: Variety of tweaks to View API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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
Index: chrome/browser/ui/views/frame/browser_view_layout.cc
===================================================================
--- chrome/browser/ui/views/frame/browser_view_layout.cc (revision 86083)
+++ chrome/browser/ui/views/frame/browser_view_layout.cc (working copy)
@@ -249,7 +249,7 @@
void BrowserViewLayout::Uninstalled(views::View* host) {}
void BrowserViewLayout::ViewAdded(views::View* host, views::View* view) {
- switch (view->GetID()) {
+ switch (view->id()) {
case VIEW_ID_CONTENTS_SPLIT: {
contents_split_ = static_cast<views::SingleSplitView*>(view);
// We're installed as the LayoutManager before BrowserView creates the
@@ -286,7 +286,7 @@
}
void BrowserViewLayout::ViewRemoved(views::View* host, views::View* view) {
- switch (view->GetID()) {
+ switch (view->id()) {
case VIEW_ID_BOOKMARK_BAR:
active_bookmark_bar_ = NULL;
break;
@@ -370,7 +370,7 @@
browser_view_->UseCompactNavigationBar());
compact_options_bar_->SetVisible(browser_view_->UseCompactNavigationBar());
- if (compact_navigation_bar_->IsVisible()) {
+ if (compact_navigation_bar_->visible()) {
gfx::Rect cnav_bar_bounds;
gfx::Size cnav_bar_size = compact_navigation_bar_->GetPreferredSize();
cnav_bar_bounds.set_origin(tabstrip_bounds.origin());
@@ -407,7 +407,9 @@
int BrowserViewLayout::LayoutToolbar(int top) {
int browser_view_width = vertical_layout_rect_.width();
bool toolbar_visible = browser_view_->IsToolbarVisible();
- toolbar_->location_bar()->SetFocusable(toolbar_visible);
+ // TODO(beng): This should not be needed. Focusability should include
+ // visibility.
+ toolbar_->location_bar()->set_focusable(toolbar_visible);
int y = top;
if (!browser_view_->UseVerticalTabs()) {
y -= ((toolbar_visible || browser_view_->UseCompactNavigationBar()) &&
@@ -597,13 +599,13 @@
}
if (contents_split_->GetChildViewAt(1) &&
- contents_split_->GetChildViewAt(1)->IsVisible())
+ contents_split_->GetChildViewAt(1)->visible())
return 0;
if (SidebarManager::IsSidebarAllowed()) {
views::View* sidebar_split = contents_split_->GetChildViewAt(0);
if (sidebar_split->GetChildViewAt(1) &&
- sidebar_split->GetChildViewAt(1)->IsVisible())
+ sidebar_split->GetChildViewAt(1)->visible())
return 0;
}
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/frame/glass_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698