OLD | NEW |
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 "chrome/browser/ui/views/constrained_window_views.h" | 5 #include "chrome/browser/ui/views/constrained_window_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "chrome/browser/themes/theme_properties.h" | 9 #include "chrome/browser/themes/theme_properties.h" |
10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 | 316 |
317 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowFrameView); | 317 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowFrameView); |
318 }; | 318 }; |
319 | 319 |
320 const gfx::Font* ConstrainedWindowFrameView::title_font_ = NULL; | 320 const gfx::Font* ConstrainedWindowFrameView::title_font_ = NULL; |
321 | 321 |
322 namespace { | 322 namespace { |
323 // The frame border is only visible in restored mode and is hardcoded to 4 px on | 323 // The frame border is only visible in restored mode and is hardcoded to 4 px on |
324 // each side regardless of the system window border size. | 324 // each side regardless of the system window border size. |
325 const int kFrameBorderThickness = 4; | 325 const int kFrameBorderThickness = 4; |
326 // Various edges of the frame border have a 1 px shadow along their edges; in a | |
327 // few cases we shift elements based on this amount for visual appeal. | |
328 const int kFrameShadowThickness = 1; | |
329 // In the window corners, the resize areas don't actually expand bigger, but the | 326 // In the window corners, the resize areas don't actually expand bigger, but the |
330 // 16 px at the end of each edge triggers diagonal resizing. | 327 // 16 px at the end of each edge triggers diagonal resizing. |
331 const int kResizeAreaCornerSize = 16; | 328 const int kResizeAreaCornerSize = 16; |
332 // The titlebar never shrinks too short to show the caption button plus some | 329 // The titlebar never shrinks too short to show the caption button plus some |
333 // padding below it. | 330 // padding below it. |
334 const int kCaptionButtonHeightWithPadding = 19; | 331 const int kCaptionButtonHeightWithPadding = 19; |
335 // The titlebar has a 2 px 3D edge along the top and bottom. | 332 // The titlebar has a 2 px 3D edge along the top and bottom. |
336 const int kTitlebarTopAndBottomEdgeThickness = 2; | 333 const int kTitlebarTopAndBottomEdgeThickness = 2; |
337 // The icon would never shrink below 16 px on a side, if there was one. | 334 // The icon would never shrink below 16 px on a side, if there was one. |
338 const int kIconMinimumSize = 16; | 335 const int kIconMinimumSize = 16; |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 } | 649 } |
653 #if defined(USE_ASH) | 650 #if defined(USE_ASH) |
654 ash::CustomFrameViewAsh* frame = new ash::CustomFrameViewAsh(widget); | 651 ash::CustomFrameViewAsh* frame = new ash::CustomFrameViewAsh(widget); |
655 // Always use "active" look. | 652 // Always use "active" look. |
656 frame->SetInactiveRenderingDisabled(true); | 653 frame->SetInactiveRenderingDisabled(true); |
657 return frame; | 654 return frame; |
658 #endif | 655 #endif |
659 return new ConstrainedWindowFrameView(widget, | 656 return new ConstrainedWindowFrameView(widget, |
660 browser_context->IsOffTheRecord()); | 657 browser_context->IsOffTheRecord()); |
661 } | 658 } |
OLD | NEW |