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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 }; | 95 }; |
96 | 96 |
97 /////////////////////////////////////////////////////////////////////////////// | 97 /////////////////////////////////////////////////////////////////////////////// |
98 | 98 |
99 class MockImmersiveModeController : public ImmersiveModeController { | 99 class MockImmersiveModeController : public ImmersiveModeController { |
100 public: | 100 public: |
101 MockImmersiveModeController() {} | 101 MockImmersiveModeController() {} |
102 virtual ~MockImmersiveModeController() {} | 102 virtual ~MockImmersiveModeController() {} |
103 | 103 |
104 // ImmersiveModeController overrides: | 104 // ImmersiveModeController overrides: |
105 virtual void Init(Delegate* delegate, | 105 virtual void Init(BrowserView* browser_view) OVERRIDE {} |
106 views::Widget* widget, | |
107 views::View* top_container) OVERRIDE {} | |
108 virtual void SetEnabled(bool enabled) OVERRIDE {} | 106 virtual void SetEnabled(bool enabled) OVERRIDE {} |
109 virtual bool IsEnabled() const OVERRIDE { return false; } | 107 virtual bool IsEnabled() const OVERRIDE { return false; } |
110 virtual bool ShouldHideTabIndicators() const OVERRIDE { return false; } | 108 virtual bool ShouldHideTabIndicators() const OVERRIDE { return false; } |
111 virtual bool ShouldHideTopViews() const OVERRIDE { return false; } | 109 virtual bool ShouldHideTopViews() const OVERRIDE { return false; } |
112 virtual bool IsRevealed() const OVERRIDE { return false; } | 110 virtual bool IsRevealed() const OVERRIDE { return false; } |
113 virtual int GetTopContainerVerticalOffset( | 111 virtual int GetTopContainerVerticalOffset( |
114 const gfx::Size& top_container_size) const OVERRIDE { return 0; } | 112 const gfx::Size& top_container_size) const OVERRIDE { return 0; } |
115 virtual ImmersiveRevealedLock* GetRevealedLock( | 113 virtual ImmersiveRevealedLock* GetRevealedLock( |
116 AnimateReveal animate_reveal) OVERRIDE WARN_UNUSED_RESULT { return NULL; } | 114 AnimateReveal animate_reveal) OVERRIDE WARN_UNUSED_RESULT { return NULL; } |
117 virtual void OnFindBarVisibleBoundsChanged( | 115 virtual void OnFindBarVisibleBoundsChanged( |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 const int kBottom = 500; | 247 const int kBottom = 500; |
250 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); | 248 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); |
251 | 249 |
252 // Download shelf layout moves up the bottom edge and sets visibility. | 250 // Download shelf layout moves up the bottom edge and sets visibility. |
253 delegate()->set_download_shelf_needs_layout(true); | 251 delegate()->set_download_shelf_needs_layout(true); |
254 download_shelf->SetVisible(false); | 252 download_shelf->SetVisible(false); |
255 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); | 253 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); |
256 EXPECT_TRUE(download_shelf->visible()); | 254 EXPECT_TRUE(download_shelf->visible()); |
257 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); | 255 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); |
258 } | 256 } |
OLD | NEW |