OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_non_client_frame_view_aura.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.h" |
6 | 6 |
7 #include "chrome/browser/ui/views/frame/browser_frame.h" | 7 #include "chrome/browser/ui/views/frame/browser_frame.h" |
8 #include "chrome/browser/ui/views/frame/browser_view.h" | 8 #include "chrome/browser/ui/views/frame/browser_view.h" |
9 #include "grit/generated_resources.h" // Accessibility names | 9 #include "grit/generated_resources.h" // Accessibility names |
10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
11 #include "third_party/skia/include/core/SkCanvas.h" | 11 #include "third_party/skia/include/core/SkCanvas.h" |
12 #include "third_party/skia/include/core/SkColor.h" | 12 #include "third_party/skia/include/core/SkColor.h" |
13 #include "third_party/skia/include/core/SkPaint.h" | 13 #include "third_party/skia/include/core/SkPaint.h" |
14 #include "ui/aura/cursor.h" | 14 #include "ui/aura/cursor.h" |
15 #include "ui/base/animation/throb_animation.h" | 15 #include "ui/base/animation/throb_animation.h" |
16 #include "ui/base/hit_test.h" | 16 #include "ui/base/hit_test.h" |
17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
18 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
19 #include "ui/gfx/canvas.h" | 19 #include "ui/gfx/canvas.h" |
20 #include "ui/gfx/compositor/layer.h" | 20 #include "ui/gfx/compositor/layer.h" |
| 21 #include "ui/views/widget/widget.h" |
| 22 #include "ui/views/widget/widget_delegate.h" |
21 #include "views/controls/button/custom_button.h" | 23 #include "views/controls/button/custom_button.h" |
22 #include "views/widget/widget.h" | |
23 #include "views/widget/widget_delegate.h" | |
24 | 24 |
25 namespace { | 25 namespace { |
26 // Our window is larger than it appears, as it includes space around the edges | 26 // Our window is larger than it appears, as it includes space around the edges |
27 // where resize handles can appear. | 27 // where resize handles can appear. |
28 const int kResizeBorderThickness = 8; | 28 const int kResizeBorderThickness = 8; |
29 // The top edge is a little thinner, as it is not draggable for resize. | 29 // The top edge is a little thinner, as it is not draggable for resize. |
30 const int kTopBorderThickness = 4; | 30 const int kTopBorderThickness = 4; |
31 // Offset between top of non-client frame and top edge of opaque frame | 31 // Offset between top of non-client frame and top edge of opaque frame |
32 // background at start of slide-in animation. | 32 // background at start of slide-in animation. |
33 const int kFrameBackgroundTopOffset = 25; | 33 const int kFrameBackgroundTopOffset = 25; |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 | 577 |
578 void BrowserNonClientFrameViewAura::OnWindowHoverChanged(bool hovered) { | 578 void BrowserNonClientFrameViewAura::OnWindowHoverChanged(bool hovered) { |
579 if (hovered) { | 579 if (hovered) { |
580 maximize_button_->Show(); | 580 maximize_button_->Show(); |
581 close_button_->Show(); | 581 close_button_->Show(); |
582 } else { | 582 } else { |
583 maximize_button_->Hide(); | 583 maximize_button_->Hide(); |
584 close_button_->Hide(); | 584 close_button_->Hide(); |
585 } | 585 } |
586 } | 586 } |
OLD | NEW |