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 "ui/views/bubble/bubble_frame_view.h" | 5 #include "ui/views/bubble/bubble_frame_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "grit/ui_resources.h" | 9 #include "grit/ui_resources.h" |
10 #include "ui/base/hit_test.h" | 10 #include "ui/base/hit_test.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 bounds.right() - size.width(), | 137 bounds.right() - size.width(), |
138 title_bounds.y(), | 138 title_bounds.y(), |
139 size.width(), | 139 size.width(), |
140 title_bounds.height()); | 140 title_bounds.height()); |
141 titlebar_extra_view_bounds.Subtract(title_bounds); | 141 titlebar_extra_view_bounds.Subtract(title_bounds); |
142 titlebar_extra_view_->SetBoundsRect(titlebar_extra_view_bounds); | 142 titlebar_extra_view_->SetBoundsRect(titlebar_extra_view_bounds); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 std::string BubbleFrameView::GetClassName() const { | 146 std::string BubbleFrameView::GetClassName() const { |
147 return "ui/views/BubbleFrameView"; | 147 return "ui/views/bubble/BubbleFrameView"; |
148 } | 148 } |
149 | 149 |
150 void BubbleFrameView::ButtonPressed(Button* sender, const ui::Event& event) { | 150 void BubbleFrameView::ButtonPressed(Button* sender, const ui::Event& event) { |
151 if (sender == close_) | 151 if (sender == close_) |
152 GetWidget()->Close(); | 152 GetWidget()->Close(); |
153 } | 153 } |
154 | 154 |
155 void BubbleFrameView::SetBubbleBorder(BubbleBorder* border) { | 155 void BubbleFrameView::SetBubbleBorder(BubbleBorder* border) { |
156 bubble_border_ = border; | 156 bubble_border_ = border; |
157 set_border(bubble_border_); | 157 set_border(bubble_border_); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // |offscreen_adjust|, e.g. positive |offscreen_adjust| means bubble | 263 // |offscreen_adjust|, e.g. positive |offscreen_adjust| means bubble |
264 // window needs to be moved to the right and that means we need to move arrow | 264 // window needs to be moved to the right and that means we need to move arrow |
265 // to the left, and that means negative offset. | 265 // to the left, and that means negative offset. |
266 bubble_border_->set_arrow_offset( | 266 bubble_border_->set_arrow_offset( |
267 bubble_border_->GetArrowOffset(window_bounds.size()) - offscreen_adjust); | 267 bubble_border_->GetArrowOffset(window_bounds.size()) - offscreen_adjust); |
268 if (offscreen_adjust) | 268 if (offscreen_adjust) |
269 SchedulePaint(); | 269 SchedulePaint(); |
270 } | 270 } |
271 | 271 |
272 } // namespace views | 272 } // namespace views |
OLD | NEW |