| 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/logging.h" | 7 #include "base/logging.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" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 gfx::Point origin; | 165 gfx::Point origin; |
| 166 views::View::ConvertPointToScreen(wrench_button, &origin); | 166 views::View::ConvertPointToScreen(wrench_button, &origin); |
| 167 gfx::Rect bounds(origin.x(), origin.y(), wrench_button->width(), | 167 gfx::Rect bounds(origin.x(), origin.y(), wrench_button->width(), |
| 168 wrench_button->height()); | 168 wrench_button->height()); |
| 169 bounds.Inset(0, kWrenchBubblePointOffsetY); | 169 bounds.Inset(0, kWrenchBubblePointOffsetY); |
| 170 | 170 |
| 171 GlobalErrorBubbleView* bubble_view = | 171 GlobalErrorBubbleView* bubble_view = |
| 172 new GlobalErrorBubbleView(browser, error); | 172 new GlobalErrorBubbleView(browser, error); |
| 173 // Bubble::Show() takes ownership of the view. | 173 // Bubble::Show() takes ownership of the view. |
| 174 Bubble* bubble = Bubble::Show( | 174 Bubble* bubble = Bubble::Show( |
| 175 browser_view->GetWidget(), bounds, | 175 browser_view->GetWidget(), bounds, views::BubbleBorder::TOP_RIGHT, |
| 176 views::BubbleBorder::TOP_RIGHT, bubble_view, bubble_view); | 176 views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bubble_view, |
| 177 bubble_view); |
| 177 bubble_view->set_bubble(bubble); | 178 bubble_view->set_bubble(bubble); |
| 178 } | 179 } |
| OLD | NEW |