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/confirm_bubble_views.h" | 5 #include "chrome/browser/ui/views/confirm_bubble_views.h" |
6 | 6 |
7 #include "chrome/browser/ui/confirm_bubble.h" | 7 #include "chrome/browser/ui/confirm_bubble.h" |
8 #include "chrome/browser/ui/confirm_bubble_model.h" | 8 #include "chrome/browser/ui/confirm_bubble_model.h" |
9 #include "grit/theme_resources.h" | 9 #include "grit/theme_resources.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
11 #include "ui/gfx/image/image.h" | 11 #include "ui/gfx/image/image.h" |
12 #include "ui/views/controls/button/image_button.h" | 12 #include "ui/views/controls/button/image_button.h" |
13 #include "ui/views/controls/button/text_button.h" | 13 #include "ui/views/controls/button/text_button.h" |
14 #include "ui/views/controls/image_view.h" | 14 #include "ui/views/controls/image_view.h" |
15 #include "ui/views/controls/label.h" | 15 #include "ui/views/controls/label.h" |
16 #include "ui/views/controls/link.h" | 16 #include "ui/views/controls/link.h" |
17 #include "ui/views/layout/grid_layout.h" | 17 #include "ui/views/layout/grid_layout.h" |
18 #include "ui/views/layout/layout_constants.h" | 18 #include "ui/views/layout/layout_constants.h" |
| 19 #include "ui/views/widget/widget.h" |
19 | 20 |
20 namespace { | 21 namespace { |
21 | 22 |
22 // Maximum width for the message field. We will wrap the message text when its | 23 // Maximum width for the message field. We will wrap the message text when its |
23 // width is wider than this. | 24 // width is wider than this. |
24 const int kMaxMessageWidth = 400; | 25 const int kMaxMessageWidth = 400; |
25 | 26 |
26 } // namespace | 27 } // namespace |
27 | 28 |
28 ConfirmBubbleViews::ConfirmBubbleViews(const gfx::Point& anchor_point, | 29 ConfirmBubbleViews::ConfirmBubbleViews(const gfx::Point& anchor_point, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 155 |
155 void ShowConfirmBubble(gfx::NativeView view, | 156 void ShowConfirmBubble(gfx::NativeView view, |
156 const gfx::Point& origin, | 157 const gfx::Point& origin, |
157 ConfirmBubbleModel* model) { | 158 ConfirmBubbleModel* model) { |
158 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(origin, model); | 159 ConfirmBubbleViews* bubble = new ConfirmBubbleViews(origin, model); |
159 views::BubbleDelegateView::CreateBubble(bubble); | 160 views::BubbleDelegateView::CreateBubble(bubble); |
160 bubble->Show(); | 161 bubble->Show(); |
161 } | 162 } |
162 | 163 |
163 } // namespace chrome | 164 } // namespace chrome |
OLD | NEW |