| 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 23 matching lines...) Expand all Loading... |
| 34 toolbar_visible_ = visible; | 34 toolbar_visible_ = visible; |
| 35 } | 35 } |
| 36 void set_bookmark_bar_visible(bool visible) { | 36 void set_bookmark_bar_visible(bool visible) { |
| 37 bookmark_bar_visible_ = visible; | 37 bookmark_bar_visible_ = visible; |
| 38 } | 38 } |
| 39 | 39 |
| 40 // BrowserViewLayout::Delegate overrides: | 40 // BrowserViewLayout::Delegate overrides: |
| 41 virtual views::View* GetContentsWebView() const OVERRIDE { | 41 virtual views::View* GetContentsWebView() const OVERRIDE { |
| 42 return contents_web_view_; | 42 return contents_web_view_; |
| 43 } | 43 } |
| 44 virtual views::View* GetWindowSwitcherButton() const OVERRIDE { | |
| 45 // TODO(jamescook): Add a test for Windows that exercises the layout for | |
| 46 // this button. | |
| 47 return NULL; | |
| 48 } | |
| 49 virtual bool IsTabStripVisible() const OVERRIDE { | 44 virtual bool IsTabStripVisible() const OVERRIDE { |
| 50 return tab_strip_visible_; | 45 return tab_strip_visible_; |
| 51 } | 46 } |
| 52 virtual gfx::Rect GetBoundsForTabStripInBrowserView() const OVERRIDE { | 47 virtual gfx::Rect GetBoundsForTabStripInBrowserView() const OVERRIDE { |
| 53 return gfx::Rect(); | 48 return gfx::Rect(); |
| 54 } | 49 } |
| 55 virtual int GetTopInsetInBrowserView() const OVERRIDE { | 50 virtual int GetTopInsetInBrowserView() const OVERRIDE { |
| 56 return 0; | 51 return 0; |
| 57 } | 52 } |
| 58 virtual int GetThemeBackgroundXInset() const OVERRIDE { | 53 virtual int GetThemeBackgroundXInset() const OVERRIDE { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 const int kBottom = 500; | 258 const int kBottom = 500; |
| 264 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); | 259 EXPECT_EQ(kBottom, layout()->LayoutDownloadShelf(kBottom)); |
| 265 | 260 |
| 266 // Download shelf layout moves up the bottom edge and sets visibility. | 261 // Download shelf layout moves up the bottom edge and sets visibility. |
| 267 delegate()->set_download_shelf_needs_layout(true); | 262 delegate()->set_download_shelf_needs_layout(true); |
| 268 download_shelf->SetVisible(false); | 263 download_shelf->SetVisible(false); |
| 269 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); | 264 EXPECT_EQ(450, layout()->LayoutDownloadShelf(kBottom)); |
| 270 EXPECT_TRUE(download_shelf->visible()); | 265 EXPECT_TRUE(download_shelf->visible()); |
| 271 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); | 266 EXPECT_EQ("0,450 0x50", download_shelf->bounds().ToString()); |
| 272 } | 267 } |
| OLD | NEW |