| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/views/frame/browser_view.h" | 7 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 8 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h" | 8 #include "chrome/browser/ui/views/frame/browser_view_layout_delegate.h" |
| 9 #include "chrome/browser/ui/views/frame/contents_layout_manager.h" | 9 #include "chrome/browser/ui/views/frame/contents_layout_manager.h" |
| 10 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 10 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 return gfx::Rect(); | 46 return gfx::Rect(); |
| 47 } | 47 } |
| 48 int GetTopInsetInBrowserView() const override { return 0; } | 48 int GetTopInsetInBrowserView() const override { return 0; } |
| 49 int GetThemeBackgroundXInset() const override { return 0; } | 49 int GetThemeBackgroundXInset() const override { return 0; } |
| 50 bool IsToolbarVisible() const override { return toolbar_visible_; } | 50 bool IsToolbarVisible() const override { return toolbar_visible_; } |
| 51 bool IsBookmarkBarVisible() const override { return bookmark_bar_visible_; } | 51 bool IsBookmarkBarVisible() const override { return bookmark_bar_visible_; } |
| 52 bool DownloadShelfNeedsLayout() const override { | 52 bool DownloadShelfNeedsLayout() const override { |
| 53 return download_shelf_needs_layout_; | 53 return download_shelf_needs_layout_; |
| 54 } | 54 } |
| 55 | 55 |
| 56 FullscreenExitBubbleViews* GetFullscreenExitBubble() const override { | 56 ExclusiveAccessBubbleViews* GetExclusiveAccessBubble() const override { |
| 57 return nullptr; | 57 return nullptr; |
| 58 } | 58 } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 views::View* contents_web_view_; | 61 views::View* contents_web_view_; |
| 62 bool tab_strip_visible_; | 62 bool tab_strip_visible_; |
| 63 bool toolbar_visible_; | 63 bool toolbar_visible_; |
| 64 bool bookmark_bar_visible_; | 64 bool bookmark_bar_visible_; |
| 65 bool download_shelf_needs_layout_; | 65 bool download_shelf_needs_layout_; |
| 66 | 66 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 const int kBottom = 500; | 250 const int kBottom = 500; |
| 251 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); | 251 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); |
| 252 | 252 |
| 253 // Download shelf layout moves up the bottom edge and sets visibility. | 253 // Download shelf layout moves up the bottom edge and sets visibility. |
| 254 delegate()->set_download_shelf_needs_layout(true); | 254 delegate()->set_download_shelf_needs_layout(true); |
| 255 download_shelf->SetVisible(false); | 255 download_shelf->SetVisible(false); |
| 256 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); | 256 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); |
| 257 EXPECT_TRUE(download_shelf->visible()); | 257 EXPECT_TRUE(download_shelf->visible()); |
| 258 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); | 258 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); |
| 259 } | 259 } |
| OLD | NEW |