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

Side by Side Diff: ash/wm/custom_frame_view_ash.cc

Issue 19115003: Make the maximize button more easily hittable when there is a huge amount of tabs present (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed completely Created 7 years, 5 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/wm/custom_frame_view_ash.h" 5 #include "ash/wm/custom_frame_view_ash.h"
6 6
7 #include "ash/shell_delegate.h" 7 #include "ash/shell_delegate.h"
8 #include "ash/wm/frame_painter.h" 8 #include "ash/wm/frame_painter.h"
9 #include "ash/wm/workspace/frame_maximize_button.h" 9 #include "ash/wm/workspace/frame_maximize_button.h"
10 #include "grit/ash_resources.h" 10 #include "grit/ash_resources.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bounds()); 83 bounds());
84 } 84 }
85 85
86 gfx::Rect CustomFrameViewAsh::GetWindowBoundsForClientBounds( 86 gfx::Rect CustomFrameViewAsh::GetWindowBoundsForClientBounds(
87 const gfx::Rect& client_bounds) const { 87 const gfx::Rect& client_bounds) const {
88 int top_height = NonClientTopBorderHeight(); 88 int top_height = NonClientTopBorderHeight();
89 return frame_painter_->GetWindowBoundsForClientBounds(top_height, 89 return frame_painter_->GetWindowBoundsForClientBounds(top_height,
90 client_bounds); 90 client_bounds);
91 } 91 }
92 92
93 int CustomFrameViewAsh::NonClientHitTest(const gfx::Point& point) { 93 int CustomFrameViewAsh::NonClientHitTest(const gfx::Point& point) const {
94 return frame_painter_->NonClientHitTest(this, point); 94 return frame_painter_->NonClientHitTest(this, point);
95 } 95 }
96 96
97 void CustomFrameViewAsh::GetWindowMask(const gfx::Size& size, 97 void CustomFrameViewAsh::GetWindowMask(const gfx::Size& size,
98 gfx::Path* window_mask) { 98 gfx::Path* window_mask) {
99 // No window masks in Aura. 99 // No window masks in Aura.
100 } 100 }
101 101
102 void CustomFrameViewAsh::ResetWindowControls() { 102 void CustomFrameViewAsh::ResetWindowControls() {
103 maximize_button_->SetState(views::CustomButton::STATE_NORMAL); 103 maximize_button_->SetState(views::CustomButton::STATE_NORMAL);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 if (frame_->IsFullscreen()) 208 if (frame_->IsFullscreen())
209 return 0; 209 return 0;
210 210
211 // Reserve enough space to see the buttons, including any offset from top and 211 // Reserve enough space to see the buttons, including any offset from top and
212 // reserving space for the separator line. 212 // reserving space for the separator line.
213 return close_button_->bounds().bottom() + 213 return close_button_->bounds().bottom() +
214 frame_painter_->HeaderContentSeparatorSize(); 214 frame_painter_->HeaderContentSeparatorSize();
215 } 215 }
216 216
217 } // namespace ash 217 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698