Commit 03c32b14 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Revert wrong maximized->tablet comment changes

Bug: 726476
Change-Id: Ifdbb411cc622ae29d38778030aa755bcc38eec2e
Reviewed-on: https://chromium-review.googlesource.com/1026849
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553391}
parent 9ce0a241
...@@ -58,7 +58,7 @@ const int kContentEdgeShadowThickness = 2; ...@@ -58,7 +58,7 @@ const int kContentEdgeShadowThickness = 2;
// buttons, but the space will look cluttered if it actually slides under them, // buttons, but the space will look cluttered if it actually slides under them,
// so we stop it when the gap between the two is down to 5 px. // so we stop it when the gap between the two is down to 5 px.
const int kNewTabCaptionRestoredSpacing = 5; const int kNewTabCaptionRestoredSpacing = 5;
// In tablet mode, where the New Tab button and the caption buttons are at // In maximized mode, where the New Tab button and the caption buttons are at
// similar vertical coordinates, we need to reserve a larger, 16 px gap to avoid // similar vertical coordinates, we need to reserve a larger, 16 px gap to avoid
// looking too cluttered. // looking too cluttered.
const int kNewTabCaptionMaximizedSpacing = 16; const int kNewTabCaptionMaximizedSpacing = 16;
...@@ -158,7 +158,7 @@ gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip( ...@@ -158,7 +158,7 @@ gfx::Rect GlassBrowserFrameView::GetBoundsForTabStrip(
const int old_end_x = end_x; const int old_end_x = end_x;
end_x -= profile_switcher->width() + kProfileSwitcherButtonOffset; end_x -= profile_switcher->width() + kProfileSwitcherButtonOffset;
// In non-tablet mode, allow the new tab button to slide completely // In non-maximized mode, allow the new tab button to slide completely
// under the profile switcher button. // under the profile switcher button.
if (!IsMaximized()) { if (!IsMaximized()) {
const int new_tab_button_width = const int new_tab_button_width =
...@@ -541,7 +541,7 @@ int GlassBrowserFrameView::TopAreaHeight(bool restored) const { ...@@ -541,7 +541,7 @@ int GlassBrowserFrameView::TopAreaHeight(bool restored) const {
const int top = FrameTopBorderThickness(restored); const int top = FrameTopBorderThickness(restored);
// The tab top inset is equal to the height of any shadow region above the // The tab top inset is equal to the height of any shadow region above the
// tabs, plus a 1 px top stroke. In tablet mode, we want to push the // tabs, plus a 1 px top stroke. In maximized mode, we want to push the
// shadow region off the top of the screen but leave the top stroke. // shadow region off the top of the screen but leave the top stroke.
return (IsMaximized() && !restored) return (IsMaximized() && !restored)
? (top - GetLayoutInsets(TAB).top() + 1) ? (top - GetLayoutInsets(TAB).top() + 1)
...@@ -556,7 +556,7 @@ int GlassBrowserFrameView::TitlebarHeight(bool restored) const { ...@@ -556,7 +556,7 @@ int GlassBrowserFrameView::TitlebarHeight(bool restored) const {
if (frame()->IsFullscreen() && !restored) if (frame()->IsFullscreen() && !restored)
return 0; return 0;
// The titlebar's actual height is the same in restored and maximized, but // The titlebar's actual height is the same in restored and maximized, but
// some of it is above the screen in tablet mode. See the comment in // some of it is above the screen in maximized mode. See the comment in
// FrameTopBorderThicknessPx(). // FrameTopBorderThicknessPx().
return TitlebarMaximizedVisualHeight() + FrameTopBorderThickness(false); return TitlebarMaximizedVisualHeight() + FrameTopBorderThickness(false);
} }
...@@ -770,7 +770,7 @@ void GlassBrowserFrameView::LayoutProfileSwitcher() { ...@@ -770,7 +770,7 @@ void GlassBrowserFrameView::LayoutProfileSwitcher() {
int button_y = WindowTopY(); int button_y = WindowTopY();
if (IsMaximized()) { if (IsMaximized()) {
// In tablet mode the caption buttons appear only 19 pixels high, but // In maximized mode the caption buttons appear only 19 pixels high, but
// their contents are aligned as if they were 20 pixels high and extended // their contents are aligned as if they were 20 pixels high and extended
// 1 pixel off the top of the screen. We position the profile switcher // 1 pixel off the top of the screen. We position the profile switcher
// button the same way to match. // button the same way to match.
......
...@@ -116,7 +116,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView, ...@@ -116,7 +116,7 @@ class GlassBrowserFrameView : public BrowserNonClientFrameView,
// don't have tabs. // don't have tabs.
int TitlebarHeight(bool restored) const; int TitlebarHeight(bool restored) const;
// Returns the y coordinate for the top of the frame, which in tablet mode // Returns the y coordinate for the top of the frame, which in maximized mode
// is the top of the screen and in restored mode is 1 pixel below the top of // is the top of the screen and in restored mode is 1 pixel below the top of
// the window to leave room for the visual border that Windows draws. // the window to leave room for the visual border that Windows draws.
int WindowTopY() const; int WindowTopY() const;
......
...@@ -217,7 +217,7 @@ int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) { ...@@ -217,7 +217,7 @@ int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
// See if we're in the sysmenu region. We still have to check the tabstrip // See if we're in the sysmenu region. We still have to check the tabstrip
// first so that clicks in a tab don't get treated as sysmenu clicks. // first so that clicks in a tab don't get treated as sysmenu clicks.
gfx::Rect sysmenu_rect(IconBounds()); gfx::Rect sysmenu_rect(IconBounds());
// In tablet mode we extend the rect to the screen corner to take advantage // In maximized mode we extend the rect to the screen corner to take advantage
// of Fitts' Law. // of Fitts' Law.
if (layout_->IsTitleBarCondensed()) if (layout_->IsTitleBarCondensed())
sysmenu_rect.SetRect(0, 0, sysmenu_rect.right(), sysmenu_rect.bottom()); sysmenu_rect.SetRect(0, 0, sysmenu_rect.right(), sysmenu_rect.bottom());
...@@ -597,7 +597,7 @@ void OpaqueBrowserFrameView::PaintClientEdge(gfx::Canvas* canvas) const { ...@@ -597,7 +597,7 @@ void OpaqueBrowserFrameView::PaintClientEdge(gfx::Canvas* canvas) const {
client_bounds, true); client_bounds, true);
} }
// In tablet mode, the only edge to draw is the top one, so we're done. // In maximized mode, the only edge to draw is the top one, so we're done.
if (layout_->IsTitleBarCondensed()) if (layout_->IsTitleBarCondensed())
return; return;
......
...@@ -172,7 +172,7 @@ int OpaqueBrowserFrameViewLayout::NonClientTopHeight(bool restored) const { ...@@ -172,7 +172,7 @@ int OpaqueBrowserFrameViewLayout::NonClientTopHeight(bool restored) const {
int thickness = FrameBorderThickness(restored); int thickness = FrameBorderThickness(restored);
// The tab top inset is equal to the height of any shadow region above the // The tab top inset is equal to the height of any shadow region above the
// tabs, plus a 1 px top stroke. In tablet mode, we want to push the // tabs, plus a 1 px top stroke. In maximized mode, we want to push the
// shadow region off the top of the screen but leave the top stroke. // shadow region off the top of the screen but leave the top stroke.
if (!restored && delegate_->IsTabStripVisible() && IsTitleBarCondensed()) if (!restored && delegate_->IsTabStripVisible() && IsTitleBarCondensed())
thickness -= GetLayoutInsets(TAB).top() - 1; thickness -= GetLayoutInsets(TAB).top() - 1;
...@@ -291,7 +291,7 @@ void OpaqueBrowserFrameViewLayout::LayoutNewStyleAvatar(views::View* host) { ...@@ -291,7 +291,7 @@ void OpaqueBrowserFrameViewLayout::LayoutNewStyleAvatar(views::View* host) {
minimum_size_for_buttons_ += button_width_with_offset; minimum_size_for_buttons_ += button_width_with_offset;
trailing_button_start_ += button_width_with_offset; trailing_button_start_ += button_width_with_offset;
// In non-tablet mode, allow the new tab button to completely slide under // In non-maximized mode, allow the new tab button to completely slide under
// the avatar button. // the avatar button.
if (!IsTitleBarCondensed()) { if (!IsTitleBarCondensed()) {
trailing_button_start_ -= trailing_button_start_ -=
...@@ -514,7 +514,7 @@ void OpaqueBrowserFrameViewLayout::SetBoundsForButton( ...@@ -514,7 +514,7 @@ void OpaqueBrowserFrameViewLayout::SetBoundsForButton(
views::ImageButton::ALIGN_BOTTOM); views::ImageButton::ALIGN_BOTTOM);
// There should always be the same number of non-shadow pixels visible to the // There should always be the same number of non-shadow pixels visible to the
// side of the caption buttons. In tablet mode we extend buttons to the // side of the caption buttons. In maximized mode we extend buttons to the
// screen top and the rightmost button to the screen right (or leftmost button // screen top and the rightmost button to the screen right (or leftmost button
// to the screen left, for left-aligned buttons) to obey Fitts' Law. // to the screen left, for left-aligned buttons) to obey Fitts' Law.
bool title_bar_condensed = IsTitleBarCondensed(); bool title_bar_condensed = IsTitleBarCondensed();
......
...@@ -584,7 +584,7 @@ void ToolbarView::Layout() { ...@@ -584,7 +584,7 @@ void ToolbarView::Layout() {
next_element_x = avatar_->bounds().right() + element_padding; next_element_x = avatar_->bounds().right() + element_padding;
} }
// Extend the app menu to the screen's right edge in tablet mode just like // Extend the app menu to the screen's right edge in maximized mode just like
// we extend the back button to the left edge. // we extend the back button to the left edge.
if (maximized) if (maximized)
app_menu_width += end_padding; app_menu_width += end_padding;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment