| OLD | NEW |
| 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_layout.h" | 5 #include "chrome/browser/ui/views/frame/browser_view_layout.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/browser_finder.h" | 11 #include "chrome/browser/ui/browser_finder.h" |
| 12 #include "chrome/browser/ui/browser_window.h" | 12 #include "chrome/browser/ui/browser_window.h" |
| 13 #include "chrome/browser/ui/find_bar/find_bar.h" | 13 #include "chrome/browser/ui/find_bar/find_bar.h" |
| 14 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 14 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| 15 #include "chrome/browser/ui/search/search_model.h" | |
| 16 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" | 15 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" |
| 17 #include "chrome/browser/ui/views/download/download_shelf_view.h" | 16 #include "chrome/browser/ui/views/download/download_shelf_view.h" |
| 18 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" | 17 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" |
| 19 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h" | 18 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h" |
| 20 #include "chrome/browser/ui/views/frame/contents_layout_manager.h" | 19 #include "chrome/browser/ui/views/frame/contents_layout_manager.h" |
| 21 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 20 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| 22 #include "chrome/browser/ui/views/frame/top_container_view.h" | 21 #include "chrome/browser/ui/views/frame/top_container_view.h" |
| 23 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" | 22 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" |
| 24 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 23 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 25 #include "components/web_modal/web_contents_modal_dialog_host.h" | 24 #include "components/web_modal/web_contents_modal_dialog_host.h" |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 return bottom; | 533 return bottom; |
| 535 } | 534 } |
| 536 | 535 |
| 537 bool BrowserViewLayout::InfobarVisible() const { | 536 bool BrowserViewLayout::InfobarVisible() const { |
| 538 // Cast to a views::View to access GetPreferredSize(). | 537 // Cast to a views::View to access GetPreferredSize(). |
| 539 views::View* infobar_container = infobar_container_; | 538 views::View* infobar_container = infobar_container_; |
| 540 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. | 539 // NOTE: Can't check if the size IsEmpty() since it's always 0-width. |
| 541 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && | 540 return browser_->SupportsWindowFeature(Browser::FEATURE_INFOBAR) && |
| 542 (infobar_container->GetPreferredSize().height() != 0); | 541 (infobar_container->GetPreferredSize().height() != 0); |
| 543 } | 542 } |
| OLD | NEW |