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