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/global_error_bubble_view.h" | 5 #include "chrome/browser/ui/views/global_error_bubble_view.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/ui/global_error.h" | 8 #include "chrome/browser/ui/global_error.h" |
9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
10 #include "chrome/browser/ui/views/toolbar_view.h" | 10 #include "chrome/browser/ui/views/toolbar_view.h" |
11 #include "ui/base/resource/resource_bundle.h" | 11 #include "ui/base/resource/resource_bundle.h" |
12 #include "ui/gfx/image/image.h" | 12 #include "ui/gfx/image/image.h" |
| 13 #include "ui/views/layout/grid_layout.h" |
| 14 #include "ui/views/layout/layout_constants.h" |
13 #include "views/controls/button/text_button.h" | 15 #include "views/controls/button/text_button.h" |
14 #include "views/controls/image_view.h" | 16 #include "views/controls/image_view.h" |
15 #include "views/controls/label.h" | 17 #include "views/controls/label.h" |
16 #include "views/layout/grid_layout.h" | |
17 #include "views/layout/layout_constants.h" | |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 enum { | 21 enum { |
22 TAG_ACCEPT_BUTTON = 1, | 22 TAG_ACCEPT_BUTTON = 1, |
23 TAG_CANCEL_BUTTON, | 23 TAG_CANCEL_BUTTON, |
24 }; | 24 }; |
25 | 25 |
26 const int kMaxBubbleViewWidth = 262; | 26 const int kMaxBubbleViewWidth = 262; |
27 | 27 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 views::View* wrench_button = browser_view->toolbar()->app_menu(); | 148 views::View* wrench_button = browser_view->toolbar()->app_menu(); |
149 GlobalErrorBubbleView* bubble_view = | 149 GlobalErrorBubbleView* bubble_view = |
150 new GlobalErrorBubbleView(wrench_button, | 150 new GlobalErrorBubbleView(wrench_button, |
151 views::BubbleBorder::TOP_RIGHT, | 151 views::BubbleBorder::TOP_RIGHT, |
152 SK_ColorWHITE, | 152 SK_ColorWHITE, |
153 browser, | 153 browser, |
154 error); | 154 error); |
155 views::BubbleDelegateView::CreateBubble(bubble_view); | 155 views::BubbleDelegateView::CreateBubble(bubble_view); |
156 bubble_view->StartFade(true); | 156 bubble_view->StartFade(true); |
157 } | 157 } |
OLD | NEW |