| 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" |
| 11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 12 #include "chrome/browser/ui/global_error.h" | 12 #include "chrome/browser/ui/global_error/global_error.h" |
| 13 #include "chrome/browser/ui/global_error_service.h" | 13 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 14 #include "chrome/browser/ui/global_error_service_factory.h" | 14 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 15 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h" | 15 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h" |
| 16 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 16 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| 17 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 17 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
| 18 #include "chrome/browser/ui/gtk/gtk_util.h" | 18 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 19 #include "ui/base/gtk/gtk_hig_constants.h" | 19 #include "ui/base/gtk/gtk_hig_constants.h" |
| 20 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
| 21 #include "ui/gfx/gtk_util.h" | 21 #include "ui/gfx/gtk_util.h" |
| 22 #include "ui/gfx/image/image.h" | 22 #include "ui/gfx/image/image.h" |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()->GetNativeWindow()); | 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 |