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 "ash/wm/maximize_bubble_controller.h" | 5 #include "ash/wm/maximize_bubble_controller.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/window_animations.h" | 10 #include "ash/wm/window_animations.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 gfx::Size anchor_size_; | 76 gfx::Size anchor_size_; |
77 gfx::Point anchor_screen_origin_; | 77 gfx::Point anchor_screen_origin_; |
78 views::View* content_view_; | 78 views::View* content_view_; |
79 | 79 |
80 DISALLOW_COPY_AND_ASSIGN(MaximizeBubbleBorder); | 80 DISALLOW_COPY_AND_ASSIGN(MaximizeBubbleBorder); |
81 }; | 81 }; |
82 | 82 |
83 MaximizeBubbleBorder::MaximizeBubbleBorder(views::View* content_view, | 83 MaximizeBubbleBorder::MaximizeBubbleBorder(views::View* content_view, |
84 views::View* anchor) | 84 views::View* anchor) |
85 : views::BubbleBorder(views::BubbleBorder::TOP_RIGHT, | 85 : views::BubbleBorder(views::BubbleBorder::TOP_RIGHT, |
86 views::BubbleBorder::NO_SHADOW), | 86 views::BubbleBorder::NO_SHADOW, |
| 87 kBubbleBackgroundColor), |
87 anchor_size_(anchor->size()), | 88 anchor_size_(anchor->size()), |
88 anchor_screen_origin_(0, 0), | 89 anchor_screen_origin_(0, 0), |
89 content_view_(content_view) { | 90 content_view_(content_view) { |
90 views::View::ConvertPointToScreen(anchor, &anchor_screen_origin_); | 91 views::View::ConvertPointToScreen(anchor, &anchor_screen_origin_); |
91 set_alignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 92 set_alignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
92 } | 93 } |
93 | 94 |
94 void MaximizeBubbleBorder::GetMask(gfx::Path* mask) { | 95 void MaximizeBubbleBorder::GetMask(gfx::Path* mask) { |
95 gfx::Insets inset = GetInsets(); | 96 gfx::Insets inset = GetInsets(); |
96 // Note: Even though the tip could be added as activatable, it is left out | 97 // Note: Even though the tip could be added as activatable, it is left out |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 if (!GetBoundsInScreen().Contains(screen_location)) | 855 if (!GetBoundsInScreen().Contains(screen_location)) |
855 button_row_->ButtonHovered(NULL); | 856 button_row_->ButtonHovered(NULL); |
856 else | 857 else |
857 button_row_->ButtonHovered(this); | 858 button_row_->ButtonHovered(this); |
858 | 859 |
859 // Pass the event on to the normal handler. | 860 // Pass the event on to the normal handler. |
860 return views::ImageButton::OnMouseDragged(event); | 861 return views::ImageButton::OnMouseDragged(event); |
861 } | 862 } |
862 | 863 |
863 } // namespace ash | 864 } // namespace ash |
OLD | NEW |