Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_unittest.cc

Issue 1460483003: Fix opaque frame app mode windows to have correct toolbar/content separator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" 10 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 bool IsFullscreen() const override { 105 bool IsFullscreen() const override {
106 return window_state_ == STATE_FULLSCREEN; 106 return window_state_ == STATE_FULLSCREEN;
107 } 107 }
108 108
109 bool IsTabStripVisible() const override { return window_title_.empty(); } 109 bool IsTabStripVisible() const override { return window_title_.empty(); }
110 110
111 int GetTabStripHeight() const override { 111 int GetTabStripHeight() const override {
112 return IsTabStripVisible() ? Tab::GetMinimumInactiveSize().height() : 0; 112 return IsTabStripVisible() ? Tab::GetMinimumInactiveSize().height() : 0;
113 } 113 }
114 114
115 bool IsToolbarVisible() const override { return true; }
116
115 gfx::Size GetTabstripPreferredSize() const override { 117 gfx::Size GetTabstripPreferredSize() const override {
116 // Measured from Tabstrip::GetPreferredSize(). 118 // Measured from Tabstrip::GetPreferredSize().
117 return IsTabStripVisible() ? gfx::Size(78, 29) : gfx::Size(0, 0); 119 return IsTabStripVisible() ? gfx::Size(78, 29) : gfx::Size(0, 0);
118 } 120 }
119 121
120 private: 122 private:
121 base::string16 window_title_; 123 base::string16 window_title_;
122 bool show_avatar_; 124 bool show_avatar_;
123 bool show_caption_buttons_; 125 bool show_caption_buttons_;
124 WindowState window_state_; 126 WindowState window_state_;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 395
394 // Check the location of the avatar button. 396 // Check the location of the avatar button.
395 EXPECT_EQ("385,1 12x18", new_avatar_button_->bounds().ToString()); 397 EXPECT_EQ("385,1 12x18", new_avatar_button_->bounds().ToString());
396 // The new tab button is 39px wide and slides completely under the new 398 // The new tab button is 39px wide and slides completely under the new
397 // avatar button, thus increasing the tabstrip by that amount. 399 // avatar button, thus increasing the tabstrip by that amount.
398 EXPECT_EQ("-1,13 420x29", 400 EXPECT_EQ("-1,13 420x29",
399 layout_manager_->GetBoundsForTabStrip( 401 layout_manager_->GetBoundsForTabStrip(
400 delegate_->GetTabstripPreferredSize(), kWidth).ToString()); 402 delegate_->GetTabstripPreferredSize(), kWidth).ToString());
401 EXPECT_EQ("261x73", layout_manager_->GetMinimumSize(kWidth).ToString()); 403 EXPECT_EQ("261x73", layout_manager_->GetMinimumSize(kWidth).ToString());
402 } 404 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view_layout_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698