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/opaque_browser_frame_view_layout.h" | 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/ui/layout_constants.h" | 10 #include "chrome/browser/ui/layout_constants.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 bool IsMinimized() const override { return false; } | 67 bool IsMinimized() const override { return false; } |
68 bool IsFullscreen() const override { return false; } | 68 bool IsFullscreen() const override { return false; } |
69 bool IsTabStripVisible() const override { return window_title_.empty(); } | 69 bool IsTabStripVisible() const override { return window_title_.empty(); } |
70 int GetTabStripHeight() const override { | 70 int GetTabStripHeight() const override { |
71 return IsTabStripVisible() ? Tab::GetMinimumInactiveSize().height() : 0; | 71 return IsTabStripVisible() ? Tab::GetMinimumInactiveSize().height() : 0; |
72 } | 72 } |
73 bool IsToolbarVisible() const override { return true; } | 73 bool IsToolbarVisible() const override { return true; } |
74 gfx::Size GetTabstripPreferredSize() const override { | 74 gfx::Size GetTabstripPreferredSize() const override { |
75 return IsTabStripVisible() ? gfx::Size(78, 29) : gfx::Size(); | 75 return IsTabStripVisible() ? gfx::Size(78, 29) : gfx::Size(); |
76 } | 76 } |
77 int GetToolbarLeadingCornerClientWidth() const override { return 0; } | |
78 | 77 |
79 private: | 78 private: |
80 base::string16 window_title_; | 79 base::string16 window_title_; |
81 bool show_caption_buttons_; | 80 bool show_caption_buttons_; |
82 bool maximized_; | 81 bool maximized_; |
83 | 82 |
84 DISALLOW_COPY_AND_ASSIGN(TestLayoutDelegate); | 83 DISALLOW_COPY_AND_ASSIGN(TestLayoutDelegate); |
85 }; | 84 }; |
86 | 85 |
87 } // namespace | 86 } // namespace |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 426 |
428 for (int i = 0; i < 2; ++i) { | 427 for (int i = 0; i < 2; ++i) { |
429 root_view_->Layout(); | 428 root_view_->Layout(); |
430 SCOPED_TRACE(i == 0 ? "Window is restored" : "Window is maximized"); | 429 SCOPED_TRACE(i == 0 ? "Window is restored" : "Window is maximized"); |
431 ExpectCaptionButtons(false, 0); | 430 ExpectCaptionButtons(false, 0); |
432 ExpectTabStripAndMinimumSize(false); | 431 ExpectTabStripAndMinimumSize(false); |
433 ExpectAvatar(); | 432 ExpectAvatar(); |
434 delegate_->set_maximized(true); | 433 delegate_->set_maximized(true); |
435 } | 434 } |
436 } | 435 } |
OLD | NEW |