| 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_container.h" | 9 #include "chrome/browser/ui/views/frame/contents_container.h" |
| 10 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 10 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 virtual bool ShouldHideTopViews() const OVERRIDE { return false; } | 108 virtual bool ShouldHideTopViews() const OVERRIDE { return false; } |
| 109 virtual bool IsRevealed() const OVERRIDE { return false; } | 109 virtual bool IsRevealed() const OVERRIDE { return false; } |
| 110 virtual int GetTopContainerVerticalOffset( | 110 virtual int GetTopContainerVerticalOffset( |
| 111 const gfx::Size& top_container_size) const OVERRIDE { return 0; } | 111 const gfx::Size& top_container_size) const OVERRIDE { return 0; } |
| 112 virtual ImmersiveRevealedLock* GetRevealedLock( | 112 virtual ImmersiveRevealedLock* GetRevealedLock( |
| 113 AnimateReveal animate_reveal) OVERRIDE WARN_UNUSED_RESULT { return NULL; } | 113 AnimateReveal animate_reveal) OVERRIDE WARN_UNUSED_RESULT { return NULL; } |
| 114 virtual void AnchorWidgetToTopContainer(views::Widget* widget, | 114 virtual void AnchorWidgetToTopContainer(views::Widget* widget, |
| 115 int y_offset) OVERRIDE {} | 115 int y_offset) OVERRIDE {} |
| 116 virtual void UnanchorWidgetFromTopContainer(views::Widget* widget) OVERRIDE {} | 116 virtual void UnanchorWidgetFromTopContainer(views::Widget* widget) OVERRIDE {} |
| 117 virtual void OnTopContainerBoundsChanged() OVERRIDE {} | 117 virtual void OnTopContainerBoundsChanged() OVERRIDE {} |
| 118 virtual void AddObserver(Observer* observer) OVERRIDE {} |
| 119 virtual void RemoveObserver(Observer* observer) OVERRIDE {} |
| 118 | 120 |
| 119 private: | 121 private: |
| 120 DISALLOW_COPY_AND_ASSIGN(MockImmersiveModeController); | 122 DISALLOW_COPY_AND_ASSIGN(MockImmersiveModeController); |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 /////////////////////////////////////////////////////////////////////////////// | 125 /////////////////////////////////////////////////////////////////////////////// |
| 124 // Tests of BrowserViewLayout. Runs tests without constructing a BrowserView. | 126 // Tests of BrowserViewLayout. Runs tests without constructing a BrowserView. |
| 125 class BrowserViewLayoutTest : public BrowserWithTestWindowTest { | 127 class BrowserViewLayoutTest : public BrowserWithTestWindowTest { |
| 126 public: | 128 public: |
| 127 BrowserViewLayoutTest() | 129 BrowserViewLayoutTest() |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 const int kBottom = 500; | 257 const int kBottom = 500; |
| 256 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); | 258 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); |
| 257 | 259 |
| 258 // Download shelf layout moves up the bottom edge and sets visibility. | 260 // Download shelf layout moves up the bottom edge and sets visibility. |
| 259 delegate()->set_download_shelf_needs_layout(true); | 261 delegate()->set_download_shelf_needs_layout(true); |
| 260 download_shelf->SetVisible(false); | 262 download_shelf->SetVisible(false); |
| 261 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); | 263 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); |
| 262 EXPECT_TRUE(download_shelf->visible()); | 264 EXPECT_TRUE(download_shelf->visible()); |
| 263 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); | 265 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); |
| 264 } | 266 } |
| OLD | NEW |