| 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/gtk/global_error_bubble.h" | 5 #include "chrome/browser/ui/gtk/global_error_bubble.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 void GlobalErrorBubble::CloseBubbleView() { | 158 void GlobalErrorBubble::CloseBubbleView() { |
| 159 bubble_->Close(); | 159 bubble_->Close(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 GlobalErrorBubbleViewBase* GlobalErrorBubbleViewBase::ShowBubbleView( | 162 GlobalErrorBubbleViewBase* GlobalErrorBubbleViewBase::ShowBubbleView( |
| 163 Browser* browser, | 163 Browser* browser, |
| 164 const base::WeakPtr<GlobalError>& error) { | 164 const base::WeakPtr<GlobalError>& error) { |
| 165 BrowserWindowGtk* browser_window = | 165 BrowserWindowGtk* browser_window = |
| 166 BrowserWindowGtk::GetBrowserWindowForNativeWindow( | 166 BrowserWindowGtk::GetBrowserWindowForNativeWindow( |
| 167 browser->window()->GetNativeHandle()); | 167 browser->window()->GetNativeWindow()); |
| 168 GtkWidget* anchor = browser_window->GetToolbar()->GetAppMenuButton(); | 168 GtkWidget* anchor = browser_window->GetToolbar()->GetAppMenuButton(); |
| 169 | 169 |
| 170 // The bubble will be automatically deleted when it's closed. | 170 // The bubble will be automatically deleted when it's closed. |
| 171 return new GlobalErrorBubble(browser, error, anchor); | 171 return new GlobalErrorBubble(browser, error, anchor); |
| 172 } | 172 } |
| OLD | NEW |