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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 108063004: Give up focus if the focused view becomes unfocusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extracted to common code into FocusManager class Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 return kViewClassName; 1812 return kViewClassName;
1813 } 1813 }
1814 1814
1815 void BrowserView::Layout() { 1815 void BrowserView::Layout() {
1816 if (!initialized_ || in_process_fullscreen_) 1816 if (!initialized_ || in_process_fullscreen_)
1817 return; 1817 return;
1818 1818
1819 views::View::Layout(); 1819 views::View::Layout();
1820 1820
1821 // TODO(jamescook): Why was this in the middle of layout code? 1821 // TODO(jamescook): Why was this in the middle of layout code?
1822 toolbar_->location_bar()->omnibox_view()->set_focusable(IsToolbarVisible()); 1822 toolbar_->location_bar()->omnibox_view()->SetFocusable(IsToolbarVisible());
1823 1823
1824 // The status bubble position requires that all other layout finish first. 1824 // The status bubble position requires that all other layout finish first.
1825 LayoutStatusBubble(); 1825 LayoutStatusBubble();
1826 } 1826 }
1827 1827
1828 void BrowserView::PaintChildren(gfx::Canvas* canvas) { 1828 void BrowserView::PaintChildren(gfx::Canvas* canvas) {
1829 // Paint the |infobar_container_| last so that it may paint its 1829 // Paint the |infobar_container_| last so that it may paint its
1830 // overlapping tabs. 1830 // overlapping tabs.
1831 for (int i = 0; i < child_count(); ++i) { 1831 for (int i = 0; i < child_count(); ++i) {
1832 View* child = child_at(i); 1832 View* child = child_at(i);
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
2668 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2668 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2669 gfx::Point icon_bottom( 2669 gfx::Point icon_bottom(
2670 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2670 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2671 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2671 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2672 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2672 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2673 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2673 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2674 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2674 top_arrow_height = infobar_top.y() - icon_bottom.y();
2675 } 2675 }
2676 return top_arrow_height; 2676 return top_arrow_height;
2677 } 2677 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698