| 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 "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
| 12 #include "ui/gfx/image/image.h" | 13 #include "ui/gfx/image/image.h" |
| 13 #include "ui/views/layout/grid_layout.h" | 14 #include "ui/views/layout/grid_layout.h" |
| 14 #include "ui/views/layout/layout_constants.h" | 15 #include "ui/views/layout/layout_constants.h" |
| 15 #include "views/controls/button/text_button.h" | 16 #include "views/controls/button/text_button.h" |
| 16 #include "views/controls/image_view.h" | 17 #include "views/controls/image_view.h" |
| 17 #include "views/controls/label.h" | 18 #include "views/controls/label.h" |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 | 21 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 146 |
| 146 void GlobalError::ShowBubbleView(Browser* browser, GlobalError* error) { | 147 void GlobalError::ShowBubbleView(Browser* browser, GlobalError* error) { |
| 147 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); | 148 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); |
| 148 views::View* wrench_button = browser_view->toolbar()->app_menu(); | 149 views::View* wrench_button = browser_view->toolbar()->app_menu(); |
| 149 GlobalErrorBubbleView* bubble_view = | 150 GlobalErrorBubbleView* bubble_view = |
| 150 new GlobalErrorBubbleView(wrench_button, | 151 new GlobalErrorBubbleView(wrench_button, |
| 151 views::BubbleBorder::TOP_RIGHT, | 152 views::BubbleBorder::TOP_RIGHT, |
| 152 SK_ColorWHITE, | 153 SK_ColorWHITE, |
| 153 browser, | 154 browser, |
| 154 error); | 155 error); |
| 155 views::BubbleDelegateView::CreateBubble(bubble_view); | 156 browser::CreateViewsBubble(bubble_view); |
| 156 bubble_view->StartFade(true); | 157 bubble_view->StartFade(true); |
| 157 } | 158 } |
| OLD | NEW |